The totals shown by the Invoice Generator are accurate to the cent, because every calculation is done in integer cents inside your browser rather than as decimal dollars in floating-point arithmetic. Floating-point math is the single most common reason a subtotal, tax line, or grand total comes out one cent high or low in calculators, spreadsheets, and many online invoice forms. Storing each value as a whole number of cents removes that rounding drift at its source, so the sum of your line items, the tax applied to that sum, and any flat discount you subtract always reconcile to a clean final figure. The on-page preview mirrors the downloaded PDF line for line, so the total you see while typing is exactly the total your client receives in the attached file. Nothing is uploaded to a server at any stage, no account is required, and the PDF is generated locally with no watermark or third-party branding.

Why Invoice Totals Sometimes Come Out Wrong
Most invoice errors are not formula mistakes. They are rounding mistakes, and rounding mistakes come from how computers store decimal numbers. A value such as 7.95 cannot be represented exactly in binary floating-point, so the program holds something very close to 7.95 and rounds it back when you read it. When you add many of these near-values together, the tiny errors accumulate and a sum that should end in .00 ends in .01 instead. Spreadsheets hide this by displaying two decimals while storing more, which is why an exported CSV can disagree with what the screen showed.
Three other sources of drift show up in real billing workflows:
- Discount formulas that ignore the order of operations. Subtracting a discount before tax produces a different tax base than subtracting it after tax, and switching the order between invoices makes the totals inconsistent.
- Quantity typos that silently change the math. A misplaced decimal on a unit price is easy to miss in a spreadsheet cell, but it shifts every downstream line.
- Manual rekeying between tools. Typing totals from one program into another is the fastest way to introduce a one- or two-cent error that the client catches before you do.
These are not user errors in the usual sense. They are the predictable failure modes of decimal arithmetic done the way most general-purpose software does it.
How the Invoice Generator Keeps the Math Exact
The Invoice Generator sidesteps the rounding problem by working in integer cents end to end. Each line item stores its unit price in cents, multiplies by the quantity in cents, and accumulates the subtotal in cents. Tax is calculated on the cent value of the subtotal, and the flat discount is subtracted in cents. Only when the final number has to be displayed or written into the PDF does it get formatted back into dollars and cents, and that formatting step cannot lose precision because the underlying value never had any.
The same JavaScript routine that powers the live preview also generates the PDF, so the numbers in the browser and the numbers on the printed page come from the same calculation. If you can read it in the preview, you can bill it in the PDF. The discount field is also clamped: if you type a discount larger than the amount due, the tool holds the discount at the amount due so the total can never drop below zero. That single rule prevents a class of bug that is genuinely common in hand-rolled invoice spreadsheets.
Build an Invoice With Accurate Totals
- Open the Invoice Generator in your browser. No sign-up, no install, and nothing leaves your device.
- Fill in the From section with your business name and address, then the Bill To section with your client's details. Set an invoice number (it defaults to INV-001), pick the issue date and due date from the date pickers, and choose the currency symbol that matches how you bill.
- Add a line item for each product or service. Type a description, the quantity (whole numbers or decimals such as 1.5 hours both work), and the unit price. Use the Add item button for extra rows or the remove button on any row you want to drop.
- Enter your tax rate as a percentage and, if you have one, a flat discount amount. The subtotal, tax, discount, and total recalculate as you type, so you can watch each value settle.
- Read the totals in the live preview on the right. When everything looks right, click Download PDF to save a clean, print-ready invoice that was generated locally in your browser.
To check the math against a real example, picture three line items on one invoice:
| Description | Qty | Unit price | Amount |
|---|---|---|---|
| Consulting hours | 2 | $75.00 | $150.00 |
| Software license | 1 | $120.00 | $120.00 |
| Setup widgets | 5 | $3.50 | $17.50 |
The subtotal is the sum of the amounts: $150.00 + $120.00 + $17.50 = $287.50. Tax at 8% of $287.50 is $287.50 × 0.08 = $23.00. Before discount, the amount due is $287.50 + $23.00 = $310.50. A $20.00 discount brings the final total to $310.50 − $20.00 = $290.50. Every step is exact because the underlying values are whole cents, not floating-point dollars.
What the Live Preview Shows You
The preview pane on the Invoice Generator page is not a mock-up. It is the same layout that the PDF will use, built from the same numbers at the same time. You see your From and Bill To blocks, the invoice number and dates, an itemized table with Description, Qty, Unit Price, and Amount columns, and a summary in the lower right that lists Subtotal, Tax, Discount, and Total. Anything you add in the form fields on the left appears in the preview on the right within the same tick.
Because the PDF and the preview are produced by the same routine, you can use the preview as a final check before you click Download. Read the Subtotal against your own line math, confirm the Tax row matches the rate you entered, and make sure the Discount row shows the figure you intended. If you set a discount larger than the amount due, the preview will show the discount clamped at the amount due and the Total pinned to zero, which is the tool telling you the cap kicked in rather than silently misbilling.
Limits to Keep in Mind Before You Send
Accurate math is only part of a trustworthy invoice. A few constraints of this particular tool are worth knowing up front so they do not become surprises at send time.
| Area | What the tool does | What it does not do |
|---|---|---|
| Currencies | Displays one of four symbols: $, £, €, ¥ | No exchange-rate conversion between them |
| Branding | Clean text-based layout, no watermark | No logo or image upload in this version |
| Fonts and scripts | Always renders, even on uncommon characters | Non-Latin scripts and emoji are substituted rather than printed verbatim |
| Privacy | Everything runs locally, including the PDF | No cloud backup or device sync, so save the PDF yourself |
| Connectivity | Works offline once the page has finished loading | No live validation against a tax authority or client database |
The four currency symbols always render correctly because they are part of the standard font. The currency picker changes the display label only; it does not look up exchange rates or convert amounts, so a $100 invoice stays $100 no matter which symbol you select. If your client pays in a different currency, you handle the conversion yourself. If you need a company logo on the PDF, generate the invoice first and add the logo afterward in any PDF editor, since the downloaded file is a standard PDF with no watermark or third-party branding and accepts external edits cleanly.
For related reading on getting totals right in a printable document, the guide on building a payment receipt with correct totals walks through the same integer-cents approach for receipts.