1. The Exact Order of Operations
Financial software must never leave ambiguity regarding how percentages and line items aggregate. InvoiceFree follows a strict, standardized sequence of calculation:
- Line Item Amount: For each row,
Amount = round(Quantity × Rate, 2). - Gross Subtotal: Sum of all individual line amounts:
Subtotal = Σ(Amounti). - Discount:
- If percentage:
Discount = round(Subtotal × (Percentage / 100), 2). - If fixed dollar:
Discount = min(Subtotal, round(FixedAmount, 2)).
- If percentage:
- Taxable Base:
Taxable Base = max(0, Subtotal − Discount). - Sales Tax / VAT:
Tax = round(Taxable Base × (Tax Rate / 100), 2). - Shipping / Surcharge: Added as a flat, untaxed line after sales tax.
- Total Amount:
Total = Subtotal − Discount + Tax + Shipping. - Balance Due:
Balance Due = Total − Amount Paid.
2. Line-Item Equal Treatment Rule (Fixed-Fee Clarification)
A frequent point of confusion in invoicing tools is how different line-item types are handled. In InvoiceFree:
ALL line-item types — service, hourly, fixed fee, and product items — roll into the Subtotal IDENTICALLY.
- A fixed-fee line item is not taxed separately, not excluded from the subtotal, and not surcharged.
- Hourly line items (hours × hourly rate) roll straight into the subtotal identically to flat-rate deliverables.
- Discounts apply across the entire Subtotal, and sales tax applies uniformly to the net taxable amount
(Subtotal − Discount). - No item is taxed differently, preventing hidden math discrepancies.
3. Rounding Specifications & Cent Matching
Competitor invoicing software frequently exhibits "cent drift" — where the on-screen preview displays $1,250.00, but the exported PDF or printed page displays $1,250.01 due to floating-point rounding mismatches.
InvoiceFree prevents this bug by adhering to a single, shared math path:
- Each line item amount is rounded to two decimal places immediately upon entry.
- Intermediate subtotals and discounts are rounded to two decimal places before tax computation.
- Both the on-screen HTML preview and the downloaded PDF document query the exact same underlying calculation engine.
- Guarantee: Screen Preview Total = Downloaded PDF Total to the cent.
4. US Sales Tax Standards & Principles
Our tax fields are designed around real US sales tax realities:
- No US Federal Sales Tax: The United States has no national sales tax.
- Statewide Sales Tax: 45 states plus the District of Columbia levy statewide sales taxes.
- The NOMAD States: Five states do not impose a statewide sales tax: New Hampshire, Oregon, Montana, Alaska, and Delaware (the "NOMAD" states). However, Alaska allows local municipalities to levy sales tax, and certain Montana resort communities levy resort taxes.
- Professional Services: In 41 states and DC, pure professional and freelance services (such as graphic design, software engineering, copywriting, and consulting) are untaxed by default. States that broadly tax services include Hawaii, New Mexico, South Dakota, and West Virginia.
Test our transparent math
Create an invoice and verify the calculations yourself in real time.
Open Invoice Generator