Math

Built-in step · 10 steps

Add, average, round, and compare numbers.

Steps

StepWhat it does
Calculate absolute valueGet a number without its minus sign, for example -5 becomes 5.
Calculate averageCalculate the average of a list of numbers.
Calculate totalAdd up all numbers in a list.
Find maximum valueFind the largest number in a list.
Find middle valueFind the middle value of a list of numbers.
Find minimum valueFind the smallest number in a list.
Find most common numberFind the number that appears most often in a list.
Find the standard deviationMeasure how spread out a list of numbers is: close to 0 when they are all alike, larger the more they vary.
Format numberTurn a number into a polished display string with thousands separators, decimal places, and an optional currency symbol or percent sign, for example 1234.5 becomes $1,234.50 and 0.125 becomes 12.50%.
Round numberRound a number up, down, or to the nearest value.

Calculate absolute value

Get a number without its minus sign, for example -5 becomes 5.

Inputs

NumbervaluenumberRequired
The number to drop the minus sign from.

Outputs

The number without its minus sign.

Example output
5.25

Calculate average

Calculate the average of a list of numbers.

Inputs

NumbersvalueslistRequired
The list of numbers to average. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The average of the numbers in the list, or blank if it has none.

Example output
2.5

Calculate total

Add up all numbers in a list.

Inputs

NumbersvalueslistRequired
The list of numbers to add up. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The sum of the numbers in the list, or 0 if it is empty.

Example output
1234.5

Find maximum value

Find the largest number in a list.

Inputs

NumbersvalueslistRequired
The list of numbers to look through. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The largest number in the list, or blank if it has none.

Example output
199.99

Find middle value

Find the middle value of a list of numbers. For an even-length list, the two middle values are averaged.

Inputs

NumbersvalueslistRequired
The list of numbers to find the middle of. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The middle number once the list is sorted, or the average of the two middle numbers when the list has an even count. Blank if the list has no numbers.

Example output
2.5

Find minimum value

Find the smallest number in a list.

Inputs

NumbersvalueslistRequired
The list of numbers to look through. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The smallest number in the list, or blank if it has none.

Example output
12.5

Find most common number

Find the number that appears most often in a list.

Inputs

NumbersvalueslistRequired
The list of numbers to look through. Text like "12.50" counts as a number, and blank items are skipped.

Outputs

The number that appears most often in the list. In a tie, the one that appears first. Blank if the list has no numbers.

Example output
4.5

Find the standard deviation

Measure how spread out a list of numbers is: close to 0 when they are all alike, larger the more they vary. The same as STDEV in a spreadsheet.

Inputs

NumbersvalueslistRequired
The list of numbers. Text like 12.50 counts, and blanks are skipped.
The numbers arebasistext
A sample of a larger group (STDEV, the usual choice), or the whole group (STDEV.P).One of: sample (A sample), population (The whole group). Default: sample.

Outputs

How far the numbers typically are from their average, or blank when there are too few numbers (a sample needs two).

Example output
2.1380899353

Format number

Turn a number into a polished display string with thousands separators, decimal places, and an optional currency symbol or percent sign, for example 1234.5 becomes $1,234.50 and 0.125 becomes 12.50%.

Inputs

NumbervaluenumberRequired
The number to format.
StylestyletextRequired
How the number is presented: plain, grouped with thousands separators, a currency, or a percentage (0.125 is 12.50%).One of: plain (Plain (1234.5)), thousands (Thousands separators (1,234.5)), usd (US Dollars ($)), eur (Euros (€)), gbp (British Pounds (£)), jpy (Japanese Yen (¥)), currency (Another currency), percent (Percent (12.5%)). Default: plain.
Currencycurrencytext
The currency's three-letter code, like CAD, AUD, CHF or INR. Well-known currencies get their symbol (CA$, ₹); others are written with their code (CHF 1,234.50).Only when Style is Another currency.
Decimal placesdecimalsnumber
How many decimal places to show. Leave blank for the usual places: 2, or 0 for currencies like yen.
Separatorsseparatorstext
How thousands and decimals are written. With a decimal comma, a currency symbol follows the amount (1.234,56 €).One of: comma_period (1,234.56), period_comma (1.234,56), space_comma (1 234,56), apostrophe_period (1'234.56). Default: comma_period.

Outputs

The number as text, with thousands separators, the chosen decimal places, and a currency symbol or percent sign for those styles.

Example output
"$1,234.50"

Round number

Round a number up, down, or to the nearest value.

Inputs

NumbervaluenumberRequired
The number to round.
DirectionmodetextRequired
How to round: to the nearest value (halves away from zero, so 2.5 is 3 and -2.5 is -3), up, or down.One of: nearest, up, down. Default: nearest.
Decimal placesdecimalsnumber
How many decimal places to keep. Defaults to 0 (no decimals).Default: 0.

Outputs

The number rounded up, down, or to the nearest value at the chosen decimal places: a whole number when there are none.

Example output
3.14

On this page