Math & trig

SUBTOTAL function

Subtotal by a numbered function (1-11). SUBTOTAL works in Sheets with the usual arguments and results, on cells and on live data from the tools you connect.

Syntax

=SUBTOTAL(function_num, ref1, [ref2, ...])
ArgumentUse
function_numrequired
ref1required, repeatable
ref2optional, repeatable
required

On live data

In Sheets, SUBTOTAL sits next to live data from a connected tool: =data.orders.sum(total) totals a table, =list.orders(customer) spills a column's distinct values, and a linked table column such as table.orders[Total] is a range any function accepts.

See the integrations

More math & trig functions

All 84 math & trig functions →

Spreadsheet formulas on live business data

Sheets evaluates 491 spreadsheet functions, on cells and on data read live from your tools.