ROUND function and other math functions in Sheets
Round numbers with ROUND, ROUNDUP, ROUNDDOWN and MROUND, cut decimals with INT and TRUNC, and use ABS, MOD and SUMPRODUCT in Foxcolab Sheets, with worked examples.
Updated 3 min read
In short
The ROUND function in Foxcolab Sheets changes the stored value: =ROUND(1234.567, 2) gives 1234.57, and a negative second argument rounds to tens or hundreds. ROUNDUP and ROUNDDOWN always go away from or toward zero, MROUND rounds to a multiple such as 5, INT and TRUNC drop decimals, ABS removes the sign, MOD gives a remainder, and SUMPRODUCT multiplies ranges and adds the results.
Key takeaways
- The decimal places buttons change how a number looks. ROUND changes the number itself, so totals add up the way they're shown.
- ROUND rounds halves away from zero. ROUNDUP and ROUNDDOWN always go away from or toward zero.
- MROUND, CEILING and FLOOR round to a multiple, such as the nearest 5 or a whole box of 12.
- INT rounds down, so INT(-8.9) is -9. TRUNC just drops the decimals and gives -8.
- SUMPRODUCT(B2:B4, C2:C4) multiplies each pair and adds them up: an invoice total in one cell.
Last reviewed 5 December 2026
The ROUND function in Foxcolab Sheets rounds a number to the decimal places you choose and stores the rounded value, so invoice lines, tax and totals add up to exactly what you show. Sheets also has functions to round to a multiple, drop decimals, remove a minus sign, find a remainder and multiply columns in one step. Every formula runs in your browser, so your figures stay end-to-end encrypted.
Rounding a value or just its look#
The Decrease decimal places and Increase decimal places buttons in the toolbar change how a number looks. The cell still holds the full number, and formulas use it. ROUND changes the number itself.
That difference shows up in totals. Split 1,499 into three payments with =1499/3 and each cell shows 499.67 at two decimal places, yet the three amounts people see add up to 1,499.01. Instead, put =ROUND(1499/3, 2) in B2 and B3, and =1499-B2-B3 in B4 for the last payment, which comes to 499.66. The payments then add up to exactly 1,499.
ROUND, ROUNDUP and ROUNDDOWN#
The second argument is the number of decimal places. Zero rounds to a whole number, and a negative number rounds to tens, hundreds and so on.
=ROUND(1234.567, 2) → 1234.57
=ROUND(1234.567, 0) → 1235
=ROUND(1234.567, -2) → 1200
=ROUND(2.5, 0) → 3
=ROUND(-2.5, 0) → -3
=ROUNDUP(3.141, 1) → 3.2
=ROUNDDOWN(3.149, 1) → 3.1
=ROUNDUP(-3.141, 1) → -3.2
=ROUNDUP(130/12, 0) → 11ROUND rounds halves away from zero. ROUNDUP always moves away from zero and ROUNDDOWN always toward it, whatever the next digit is. The last line works out how many boxes of 12 you need for 130 items.
For tax on a price, round as you calculate: =ROUND(999*18%, 2) gives 179.82.
Round to a multiple: MROUND, CEILING and FLOOR#
=MROUND(47, 5) → 45
=MROUND(48, 5) → 50
=MROUND(1234.56, 0.05) → 1234.55
=CEILING(47, 5) → 50
=FLOOR(47, 5) → 45
=CEILING(130, 12) → 132MROUND goes to the nearest multiple. CEILING always goes up to the next one and FLOOR down. Use them for prices that end in 0.05, quantities in steps of 5, or stock that comes in packs.
Drop decimals and signs: INT, TRUNC and ABS#
=INT(8.9) → 8
=INT(-8.9) → -9
=TRUNC(-8.9) → -8
=TRUNC(8.97, 1) → 8.9
=ABS(-450) → 450INT rounds down, so negative numbers move further from zero. TRUNC just cuts off the digits. ABS removes the minus sign, which helps when you compare a budget with actual spending and only care about the size of the gap: =ABS(C2-B2).
Remainders: MOD and QUOTIENT#
=MOD(17, 5) → 2
=MOD(-17, 5) → 3
=QUOTIENT(135, 60)&"h "&MOD(135, 60)&"m" → 2h 15m
=MOD(45.75, 1) → 0.75MOD gives what's left after dividing, with the sign of the divisor. MOD(number, 1) keeps only the decimals. =MOD(ROW(), 2)=0 is TRUE on even rows, handy as a custom formula in conditional formatting.
Multiply and add: SUMPRODUCT#
With quantities in B2:B4 (3, 10, 1) and prices in C2:C4 (45.50, 12.25, 189), =SUMPRODUCT(B2:B4, C2:C4) gives 448, the invoice total without a line-total column.
SUMPRODUCT also makes weighted averages. With scores 72, 85 and 64 in B2:B4 and weights 20%, 30% and 50% in C2:C4, =SUMPRODUCT(B2:B4, C2:C4)/SUM(C2:C4) gives 71.9, while a plain AVERAGE gives 73.67.
To add only some rows, multiply by a condition: =SUMPRODUCT((B2:B7="East")*D2:D7).
Common mistakes#
- A condition on its own in SUMPRODUCT.
=SUMPRODUCT((B2:B7="East"), D2:D7)gives 0, because TRUE and FALSE aren't numbers here. Multiply the condition by the range, or put--in front of it. - Ranges of different sizes. SUMPRODUCT needs every range to be the same size, or it shows
#VALUE!. - Comparing decimals directly.
=0.1+0.2=0.3gives FALSE because of tiny binary differences.=ROUND(0.1+0.2, 2)=0.3gives TRUE. - Mixed signs in MROUND.
=MROUND(47, -5)shows#NUM!.
To show numbers as rupees, percentages or with lakh grouping, see Format numbers, dates and currencies in Sheets. For a full worked invoice, see How to make an invoice.
Related#
Frequently asked questions
Why does my total differ by 0.01 from the numbers shown?
The cells show rounded values, but the total adds the full numbers behind them. Round each value with ROUND, as in =ROUND(B2*18%, 2), so the total adds exactly what people see.
Why does =0.1+0.2=0.3 say FALSE?
Computers store most decimals as tiny approximations, so 0.1+0.2 is a hair more than 0.3. Round before comparing, as in =ROUND(0.1+0.2, 2)=0.3, which gives TRUE.
Why does MROUND show
The number and the multiple have different signs, as in =MROUND(47, -5). Give both the same sign.
What's the difference between MOD and QUOTIENT?
QUOTIENT gives the whole number of times one number fits into another, and MOD gives what's left over. For 17 and 5, QUOTIENT is 3 and MOD is 2.
Did this answer your question?
One click, no account needed.
Still need help?
Our support team can take it from here.