Tabellab

ROUND vs Display Formatting: Sum of Rounded vs Rounded Sum

Lesson 1 of 20Lab

All lessons

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

The invoice that is one cent off

Few things damage trust in a spreadsheet faster than a total that does not match the lines above it. A customer adds the amounts on your invoice with a calculator, gets 349.52, and your invoice says 349.51. Nobody was cheated, the difference is less than a cent, but now the customer is asking questions, the accountant wants an explanation and the person who built the template is wondering whether Excel can add. It can. The problem is that the template mixes two different things: what a cell shows and what a cell stores.

This free first lesson is for anyone who builds invoices, price lists, payroll sheets or financial reports in Excel, and for anyone who has ever been asked to explain a one-cent difference. You work with Juniper Coffee Roasters, a fictional roastery that sells to cafés. Its wholesale invoice applies a 7.5% discount to every line, which produces amounts with three, four and five decimals. You will see why number formatting alone is not enough, how ROUND fixes the stored values, and how to decide which total belongs on a document.

The interactive lab above holds the invoice. Use this article as your guide: the concept, a fully worked example with every value, step-by-step instructions, diagrams and a list of the traps that cause rounding differences in real files.

Display format versus stored value

Every number in Excel has two layers. The stored value is what Excel calculates with, held with up to 15 significant digits. The display format decides how that value is shown: with two decimals, as currency, as a percentage, with thousands separators. Changing the format with Home › Number › Decrease Decimal or Ctrl+1 › Number changes only the second layer. The first layer stays untouched.

Take Juniper’s first invoice line: 3 bags of espresso blend at a list price of 18.35 with a 7.5% discount. The exact net amount is 3 × 18.35 × (1 − 7.5%) = 50.92125. Formatted with two decimals the cell shows 50.92, but any formula that refers to the cell receives 50.92125. Do that on eight lines, add them up, and the hidden fractions add up too. Sometimes they cancel out, sometimes they push the total across a rounding boundary, and the displayed total no longer equals the sum of the displayed lines.

A quick way to see the second layer is to strip the format away. Select the cells and press Ctrl+Shift+~ to apply the General format, then widen the column: General shows as many decimals as fit in the column, so 50.92 suddenly reads 50.92125. Press Ctrl+Z to restore the original format afterwards. Doing this on a template you inherited takes ten seconds and often explains a mysterious difference straight away.

ROUND changes the stored value itself. =ROUND(number, num_digits) returns a new number with the requested precision. =ROUND(B2*C2*(1-$B$12),2) stores 50.92, not 50.92125, so everything downstream calculates with exactly the amount the customer sees. The second argument controls the precision: 2 rounds to cents, 0 to whole units, 1 to tenths, and negative values round to the left of the decimal point, so −3 rounds to thousands.

ROUND(x, 0): halves go away from zero-3-2-10123ROUND(−2.5,0) = −3ROUND(−0.6,0) = −1ROUND(1.4,0) = 1ROUND(2.5,0) = 3digits = 2 rounds to cents, 0 to whole numbers, −3 to thousands:ROUND(50.92125,2) = 50.92 · ROUND(48.23875,2) = 48.24 · ROUND(48230,−3) = 48000
ROUND looks at the next digit. Values exactly halfway are rounded away from zero, so 2.5 becomes 3 and −2.5 becomes −3.

Excel’s worksheet ROUND rounds halves away from zero: 2.5 becomes 3 and −2.5 becomes −3. This is the rule most people learned at school and the one most invoices expect. Be aware that some other tools behave differently: the Round function in Excel’s own VBA language, for example, rounds halves to the nearest even number (so-called banker’s rounding). If a macro and a formula disagree by a cent, this is often why.

Sum of rounded versus rounded sum

Once you round, a new question appears: do you round each line and then add (the sum of rounded values), or add the exact values and round once at the end (the rounded sum)? Both are legitimate. The sum of rounded lines is what an invoice needs, because the customer can recompute it from the printed lines. The rounded sum is what an accountant often prefers for internal analysis, because it carries no accumulated rounding error. The rule is consistency: a document must total exactly the numbers it shows.

Note that a format-only total is neither of the two. It adds the unrounded lines and then displays the result with two decimals. It behaves like a rounded sum on screen, but it still stores the hidden fractions, so if another formula picks it up, those fractions travel on.

Where do all those extra decimals come from?

If prices are entered with two decimals, why do the results have five? Because almost every business calculation multiplies or divides. A percentage discount of 7.5% turns a price with two decimals into an amount with up to five. Exchange rates often have four or more decimals. Splitting a cost three ways, converting kilograms into pounds or calculating an hourly rate from a monthly salary all produce long or even endless decimal fractions. Excel keeps every one of those digits, up to its limit of 15 significant digits, unless you tell it otherwise.

A second, subtler source is the way computers store numbers. Excel, like most software, uses binary floating-point numbers, and many decimal fractions such as 0.1 cannot be represented exactly in binary. The difference is tiny, far below a cent, but it can show up. Microsoft’s own documentation gives the example =1*(0.5-0.4-0.1), which returns a minute value close to −2.8E-17 instead of a clean 0. For everyday amounts this never changes a displayed cent, but it can make an exact comparison with = fail. A later lesson in this course is dedicated to those floating-point surprises and to safe ways of comparing amounts.

The practical conclusion is the same for both sources: the value behind a nicely formatted cell is very often longer than what you see, and any calculation that has to agree with printed numbers should work with deliberately rounded values.

Decide on a rounding rule before you build

Rounding problems are much easier to prevent than to explain afterwards. Before you build an invoice, quote or report template, answer four short questions and write the answers in a note on the sheet:

  1. Which precision is shown? Cents for invoices and payroll, whole currency units or thousands for management reports.
  2. Where is rounding applied? Usually on the amount that is printed or booked, for example the net line amount, and not on intermediate steps such as the discount factor.
  3. How is the total formed? On a document that lists amounts, as the sum of the rounded lines. In analysis, from the exact values, rounded once.
  4. Who else has a rule? Tax authorities, accounting software or a customer contract may prescribe how tax or totals are rounded. Check those requirements with your accountant rather than guessing, and build your template to match.

With a written rule, a one-cent question from a customer has a one-sentence answer, and the next person who edits the template knows why the ROUND functions are there and does not remove them to “simplify” the formulas.

Worked example: Juniper’s wholesale invoice

Here are all eight lines from the lab. Column D in the lab calculates the net amount without rounding and is formatted to two decimals; column E uses ROUND. The table shows what each column really stores.

ItemQtyList priceD storesD displaysE = ROUND(…,2)Hidden part (cents)
Espresso blend 1 kg318.3550.9212550.9250.92+0.125
House blend 1 kg516.9078.162578.1678.16+0.250
Decaf 500 g49.8536.44536.4536.45-0.500
Ethiopia 250 g77.4548.2387548.2448.24-0.125
Cold brew pack611.1561.882561.8861.88+0.250
Chai syrup28.9516.557516.5616.56-0.250
Paper filters93.3527.8887527.8927.89-0.125
Oat milk 1 l122.6529.41529.4229.42-0.500
Total48349.51125349.51349.52−0.875

Some lines lose a fraction of a cent when rounded (espresso blend: 50.92125 becomes 50.92), others gain one (decaf: 36.445 becomes 36.45). Across the invoice, rounding adds a net 0.875 cents. Column D’s total is 349.51125, which displays as 349.51. Column E’s total is 349.52, exactly what you get by adding the eight printed line amounts. That is the one-cent difference the customer found.

What the format hides on each line (stored − rounded, in cents)-0.50-0.25+0.25+0.500+0.125Espresso+0.250House-0.500Decaf-0.125Ethiopia+0.250Cold brew-0.250Chai-0.125Filters-0.500Oat milkROUND drops itROUND adds itNet: −0.875 cents
The hidden part of each line, in cents. Blue bars are fractions ROUND removes, peach bars are fractions it adds. They do not cancel out, so the format-only total ends up 0.875 cents below the sum of the printed lines.

The lab asks for four results. These are the formulas and values:

CellQuestionFormulaResult
E2:E9Each net line rounded to cents=ROUND(B2*C2*(1-$B$12),2)E5 = 48.24
E10Sum of rounded lines=SUM(E2:E9)349.52
B14Difference to the format-only total=E10-D100.00875
B15Which total belongs on the invoice?D or EE

The difference in B14 is 0.00875, less than one cent, even though the two totals display one cent apart. Format B14 with five decimals (Home › Number › Increase Decimal three times) to see the real gap; with two decimals it would show 0.01 and hide the very thing you are measuring.

Two ways to reach the invoice totalColumn D: format only50.92125, 78.1625 …=SUM(D2:D9)stores 349.51125Displays 349.51off by 0.875 centsColumn E: ROUND50.92, 78.16 …=SUM(E2:E9)stores 349.52Displays 349.52matches the linesCustomer’s calculator: 50.92 + 78.16 + 36.45 + 48.24 + 61.88 + 16.56 + 27.89 + 29.42= 349.52, so the invoice must use column E
The format-only route stores 349.51125 and displays 349.51. The ROUND route stores 349.52, which is what the customer gets by adding the printed lines.

Step by step in Excel

  1. Click E2 and type =ROUND(B2*C2*(1-$B$12),2). The dollar signs keep the discount cell fixed when you copy the formula; press F4 right after typing B12 to add them.
  2. Press Enter, select E2:E9 and press Ctrl+D to fill the formula down.
  3. Click E10 and press Alt+= (AutoSum). Check that Excel proposes =SUM(E2:E9) and press Enter.
  4. In B14 type =E10-D10. Then increase the decimals with Home › Number › Increase Decimal until you see 0.00875.
  5. Compare the stored and displayed values: click D2 and look at the formula bar (it shows the formula), then temporarily add decimals to column D with Ctrl+1 › Number › Decimal places to reveal 50.92125.
  6. To audit a whole column for hidden decimals, add a check such as =D2-ROUND(D2,2) next to it. Any result other than 0 means the cell stores more than it shows.
  7. Decide on the document total: since the invoice prints rounded lines, it must use the sum of rounded lines in E10. Type E in B15.
Excel has an option that forces all stored values to their displayed precision: File › Options › Advanced › When calculating this workbook › Set precision as displayed. It permanently changes the stored constants in the whole workbook and cannot be undone, so most professionals avoid it and use ROUND where it is needed instead.

Excel rounding and precision course illustration with an invoice and rounded amounts
Excel Rounding & Precision: ROUND, MROUND, CEILING, currency rounding and floating-point traps.

Common mistakes and how to spot them

  • Rounding with the format only. Fewer decimals on screen do not change the value. Spot it by adding a check column =D2-ROUND(D2,2), or by pressing Increase Decimal a few times.
  • Rounding the total but not the lines. =ROUND(SUM(D2:D9),2) is a clean rounded sum, but it can still differ from the printed lines. On a document, round each line and sum the rounded lines.
  • Rounding too early. Rounding the discount factor or a unit price before multiplying adds a larger error than rounding the final line amount. Round the result that is shown or booked, not the intermediate steps.
  • Mixing methods on one document. VAT rounded per line in one place and on the total in another produces differences that nobody can reconcile. Pick one rule per document and write it down.
  • Comparing amounts with =. Two amounts that both display 349.52 can fail a test like =E10=D10 because of hidden decimals. Compare rounded values instead: =ROUND(E10,2)=ROUND(D10,2).
  • Relative reference to the discount. Without the dollar signs, B12 slides down to B13, B14 and so on when you copy the formula, and the lines below calculate with an empty or wrong discount.

Quick reference

Function or shortcutWhat it doesExample
ROUNDRounds to a number of digits, halves away from zero=ROUND(50.92125,2) → 50.92
ROUNDUP / ROUNDDOWNAlways away from or towards zero=ROUNDUP(2.01,0) → 3
MROUNDRounds to the nearest multiple=MROUND(4.37,0.05) → 4.35
SUMAdds the stored values=SUM(E2:E9)
Ctrl+1Format Cells dialog: decimals, currencyNumber › Decimal places
Increase / Decrease DecimalChanges the display onlyHome › Number
F4Toggles absolute references$B$12
Alt+=AutoSum=SUM(E2:E9)
Ctrl+DFills the formula downE2 to E9

Real-world uses

Rounding decisions sit behind almost every number that leaves a spreadsheet and lands on paper or in a booking system. Some typical situations:

  • Invoices and quotes: line amounts after discounts or exchange rates must be rounded to cents so the total matches what is printed.
  • Payroll: hourly rates × hours and percentage-based deductions produce fractions of a cent that must be rounded the same way on every payslip.
  • Price lists: a cost-plus markup gives prices such as 12.8437, which need rounding to cents or to a price point before they reach a shelf label.
  • Financial reports: figures shown in thousands should be rounded with ROUND(…,−3) when they feed other tables, otherwise the columns no longer add up visibly.
  • Reconciliations: matching payments to invoices requires comparing amounts at cent level, because a booked amount can carry hidden decimals after a currency conversion.

What you will build in the rest of this course

This lesson set the foundation: stored value versus display, and ROUND on purpose. The remaining 19 lessons cover every rounding decision you will meet in business files, all at Juniper Coffee Roasters.

ROUNDUP, ROUNDDOWN, TRUNC & INT with Negative Numbers. Stock moves include returns with negative units. You learn why INT and TRUNC disagree on negative numbers, count boxes with ROUNDUP and full boxes with TRUNC, and work out the loose units.

MROUND, CEILING & FLOOR: Price Points, Case Sizes & 15-Minute Billing. You set shelf prices to the nearest 5 cents and to .99 charm prices, round order quantities up to full cases and bill service jobs in started quarter hours.

Currency Rounding & VAT: Per Line vs Per Invoice. VAT can be rounded on every line or once on the invoice total, and the two methods differ by a few cents. You calculate both and measure the difference, so you can explain it before anyone asks.

Rounding Differences & Penny Allocation (Largest Remainder). A 1,000.00 freight invoice split across six cafés by weight misses the total by a cent after rounding. You hand the leftover pennies to the largest remainders until the split adds up exactly.

Floating-Point Surprises: Hidden Decimals & Safe Comparisons. Converted currency amounts carry hidden decimals, so a plain = comparison reports false mismatches. You compare at cent level, count the real matches and find the cells with hidden decimals.

Percentages That Must Add to 100%. A channel mix rounded to whole percentages adds up to 101%. You round the shares, adjust the largest one so the mix totals exactly 100% and chart it as a pie.

TEXT for Display vs Value & a Chart of Rounding Error. For a board slide you round monthly revenue to thousands, build labels such as "$48k" with TEXT without losing the underlying values, and chart the rounding error so everyone sees how small, or how large, it really is.

Summary

A number format changes what a cell shows; ROUND changes what it stores. Juniper’s invoice lines store values such as 50.92125, so a format-only total of 349.51125 displays 349.51 while the printed lines add up to 349.52. Rounding each line with =ROUND(B2*C2*(1-$B$12),2) and summing the rounded lines makes the invoice consistent with what the customer sees. Choose one rounding rule per document, round results rather than intermediate steps, and compare amounts at cent level.

Now try it yourself: scroll up to the lab, round the eight invoice lines with ROUND, total them, measure the real gap to the format-only total and decide which total belongs on the invoice. The Coach checks each step and explains any slip.

Frequently asked questions

Why does my Excel total not match the sum of the displayed numbers?

The cells probably store more decimals than they show. The total adds the hidden decimals, so it can differ by a cent from the amounts you see. Round each line with ROUND(…,2) and sum the rounded lines.

What is the difference between ROUND and formatting decimals in Excel?

Formatting only changes how a number is displayed; the full value is still used in calculations. ROUND returns a new value with the requested precision, so later formulas calculate with the rounded number.

How do I round to two decimal places in Excel?

Use =ROUND(number,2), for example =ROUND(B2*C2,2). Use 0 for whole numbers and negative digits such as -3 to round to thousands.

Does Excel ROUND use banker's rounding?

No. The worksheet function ROUND rounds halves away from zero, so ROUND(2.5,0) is 3 and ROUND(-2.5,0) is -3. The Round function in VBA, by contrast, rounds halves to the nearest even number.

Should I round each line or only the total?

On an invoice or any document that shows line amounts, round each line and add the rounded lines, so the total matches what the reader sees. For internal analysis you can add exact values and round once at the end.

What does Set precision as displayed do in Excel?

It permanently changes stored values in the workbook to match their displayed format. Because the change cannot be undone, most users prefer to apply ROUND only where rounding is needed.

Keep going: Excel Rounding & Precision: ROUND, MROUND, CEILING, Currency & Floating-Point Traps

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. ROUNDUP, ROUNDDOWN, TRUNC & INT with Negative Numbers
  2. MROUND, CEILING & FLOOR: Price Points, Case Sizes & 15-Minute Billing
  3. Currency Rounding & VAT: Per Line vs Per Invoice
  4. Rounding Differences & Penny Allocation (Largest Remainder)
  5. Floating-Point Surprises: Hidden Decimals & Safe Comparisons
  6. Percentages That Must Add to 100%
  7. TEXT for Display vs Value & a Chart of Rounding Error
  8. Round Half to Even (Banker's Rounding) & Rounding Bias
  9. Significant Figures with LOG10: One Rule for KPIs of Every Size
  10. Round at the End: Cost per Cup and Intermediate Rounding Errors
  11. Decimal Hours for Payroll: Time to Hours, Rounded Hours vs Exact Pay
  12. Cash Rounding to 5 Cents at the Till & the Rounding Account
  13. Currency Conversion: Rate Precision, Line vs Total Conversion
  14. Rounding Before Thresholds: Shown 250.00, Stored 249.996
  15. Price Endings That Keep the Margin Floor: CEILING Without Losing Cents
  16. Weights & Yields: Green Coffee Needed, Roast Batches & Spare Capacity
  17. Reports in Thousands That Foot and Cross-Foot
  18. Imported Numbers: Decimal Commas, Thousands Separators & Text-Stored Values
  19. Final Project: Month-End Statement Pack with Rounding Checks & Chart

Buy course — $9.90 See the full course