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.
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:
- Which precision is shown? Cents for invoices and payroll, whole currency units or thousands for management reports.
- 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.
- 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.
- 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.
| Item | Qty | List price | D stores | D displays | E = ROUND(…,2) | Hidden part (cents) |
|---|---|---|---|---|---|---|
| Espresso blend 1 kg | 3 | 18.35 | 50.92125 | 50.92 | 50.92 | +0.125 |
| House blend 1 kg | 5 | 16.90 | 78.1625 | 78.16 | 78.16 | +0.250 |
| Decaf 500 g | 4 | 9.85 | 36.445 | 36.45 | 36.45 | -0.500 |
| Ethiopia 250 g | 7 | 7.45 | 48.23875 | 48.24 | 48.24 | -0.125 |
| Cold brew pack | 6 | 11.15 | 61.8825 | 61.88 | 61.88 | +0.250 |
| Chai syrup | 2 | 8.95 | 16.5575 | 16.56 | 16.56 | -0.250 |
| Paper filters | 9 | 3.35 | 27.88875 | 27.89 | 27.89 | -0.125 |
| Oat milk 1 l | 12 | 2.65 | 29.415 | 29.42 | 29.42 | -0.500 |
| Total | 48 | 349.51125 | 349.51 | 349.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.
The lab asks for four results. These are the formulas and values:
| Cell | Question | Formula | Result |
|---|---|---|---|
| E2:E9 | Each net line rounded to cents | =ROUND(B2*C2*(1-$B$12),2) | E5 = 48.24 |
| E10 | Sum of rounded lines | =SUM(E2:E9) | 349.52 |
| B14 | Difference to the format-only total | =E10-D10 | 0.00875 |
| B15 | Which total belongs on the invoice? | D or E | E |
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.
Step by step in Excel
- 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. - Press Enter, select E2:E9 and press Ctrl+D to fill the formula down.
- Click E10 and press Alt+= (AutoSum). Check that Excel proposes
=SUM(E2:E9)and press Enter. - In B14 type
=E10-D10. Then increase the decimals with Home › Number › Increase Decimal until you see 0.00875. - 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.
- 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. - 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.

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=D10because of hidden decimals. Compare rounded values instead:=ROUND(E10,2)=ROUND(D10,2). - Relative reference to the discount. Without the dollar signs,
B12slides 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 shortcut | What it does | Example |
|---|---|---|
ROUND | Rounds to a number of digits, halves away from zero | =ROUND(50.92125,2) → 50.92 |
ROUNDUP / ROUNDDOWN | Always away from or towards zero | =ROUNDUP(2.01,0) → 3 |
MROUND | Rounds to the nearest multiple | =MROUND(4.37,0.05) → 4.35 |
SUM | Adds the stored values | =SUM(E2:E9) |
| Ctrl+1 | Format Cells dialog: decimals, currency | Number › Decimal places |
| Increase / Decrease Decimal | Changes the display only | Home › Number |
| F4 | Toggles absolute references | $B$12 |
| Alt+= | AutoSum | =SUM(E2:E9) |
| Ctrl+D | Fills the formula down | E2 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.
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.
- ROUNDUP, ROUNDDOWN, TRUNC & INT with Negative Numbers
- MROUND, CEILING & FLOOR: Price Points, Case Sizes & 15-Minute Billing
- Currency Rounding & VAT: Per Line vs Per Invoice
- Rounding Differences & Penny Allocation (Largest Remainder)
- Floating-Point Surprises: Hidden Decimals & Safe Comparisons
- Percentages That Must Add to 100%
- TEXT for Display vs Value & a Chart of Rounding Error
- Round Half to Even (Banker's Rounding) & Rounding Bias
- Significant Figures with LOG10: One Rule for KPIs of Every Size
- Round at the End: Cost per Cup and Intermediate Rounding Errors
- Decimal Hours for Payroll: Time to Hours, Rounded Hours vs Exact Pay
- Cash Rounding to 5 Cents at the Till & the Rounding Account
- Currency Conversion: Rate Precision, Line vs Total Conversion
- Rounding Before Thresholds: Shown 250.00, Stored 249.996
- Price Endings That Keep the Margin Floor: CEILING Without Losing Cents
- Weights & Yields: Green Coffee Needed, Roast Batches & Spare Capacity
- Reports in Thousands That Foot and Cross-Foot
- Imported Numbers: Decimal Commas, Thousands Separators & Text-Stored Values
- Final Project: Month-End Statement Pack with Rounding Checks & Chart