Percent change, ratios, and tip/tax math without spreadsheets
Published: 2026-09-05
How percent change, “X is what % of Y,” tip/tax markup, and reversing a tax-inclusive total work—plus when floating-point math needs rounding for money.
Percentage questions show up constantly in reviews, invoices, and product metrics: “How much did this go up?”, “What share is this of the total?”, “Add 18% tax,” or “This receipt is tax-included—what was the pre-tax base?” You do not need a spreadsheet for those. Four formulas cover almost every everyday case, and they are easy to mix up if you pick the wrong denominator or reverse a rate incorrectly.
This guide walks through each mode with worked numbers. For live results in the browser (no upload), use the Percentage Calculator.
Four questions, four formulas
| Question | Formula | Typical use |
|---|---|---|
| How much did a value change? | ((to − from) / |from|) × 100 |
Metrics, prices, headcount |
| What share is X of Y? | (X ÷ Y) × 100 |
Mix, conversion rate, budget share |
| Add tip / tax / markup | base × (rate ÷ 100), then base + markup |
Bills, retail markup |
| Undo included tip/tax | total ÷ (1 + rate ÷ 100) |
Tax-inclusive receipts |
LocalTools’ Percentage Calculator exposes exactly these four modes. Commas and underscores in inputs are ignored so you can paste 1_200 or 1,200.
Percent change: from → to
Percent change answers “relative to where we started, how far did we move?”
percent = ((to − from) / |from|) × 100
absolute change = to − from
Using the absolute value of the starting number keeps the sign of the change in the numerator: a move from −50 to −40 is a +20% increase toward zero (absolute change +10), not a confusing negative percent from a negative base.
Example: 80 → 100
- Absolute change:
20 - Percent change:
(20 / 80) × 100= 25% (increase)
Example: 100 → 80 → −20% (decrease)
When percent change is undefined
If the starting value is zero and the ending value is not, division by zero makes percent change undefined (you cannot express “grew from nothing” as a finite percent of the start). Both zeros → unchanged at 0%. Prefer absolute deltas or a different baseline when your series crosses or starts at zero.
“X is what % of Y” (ratios)
This is a share, not a change over time:
percent = (part ÷ whole) × 100
ratio = part ÷ whole (decimal)
Example: 45 is what percent of 60?
45 ÷ 60=0.75→ 75%
Pitfalls:
- Whole must be non-zero.
- Do not confuse this with percent change. “Sales are 75% of target” is a ratio; “sales grew 75%” is a change from a prior period.
- Part can exceed whole (e.g. 120 is 120% of 100)—that is valid when overshoot is real.
Add tip, tax, or markup
When a rate sits on top of a base (restaurant tip, sales tax exclusive of price, retail markup):
markup = base × (rate ÷ 100)
total = base + markup
Example: base 86.50, rate 18%
- Markup:
86.50 × 0.18= 15.57 - Total:
86.50 + 15.57= 102.07
Same math for a 20% markup on wholesale or a VAT-exclusive line before tax—only the label changes. Stacked rates (tax on tip, compound discounts) need sequential applications; a single “add %” step does not model every jurisdiction’s rules.
Reverse: base before included tax or tip
Sometimes the number you have is already the total after the rate was added. To recover the pre-rate base:
base = total ÷ (1 + rate ÷ 100)
markup = total − base
Example: total 118 includes 18% tax
- Divisor:
1.18 - Base:
118 ÷ 1.18= 100 - Included tax: 18
This only works when the total was formed as base × (1 + rate/100). It fails if the receipt used a different rule (tax on a subset of lines, inclusive rounding per SKU, or a rate of −100%, which would make the divisor zero).
Money and floating point
Browsers compute with IEEE-754 floats. Tiny residues like 0.1 + 0.2 quirks can appear in long decimal displays. For currency:
- Compute with the formulas above.
- Round to your currency’s decimal places (usually two) when you copy into invoices or ledgers.
- Treat calculator output as a check, not a substitute for accounting software when statutory rounding rules apply.
The Percentage Calculator footnote calls this out: results use JavaScript floating-point arithmetic; round after copying for money.
A practical workflow without a sheet
- Name the question: change, share, add rate, or reverse inclusive total.
- Enter amounts in the matching mode on the Percentage Calculator.
- Copy the result row you need (percent, absolute delta, markup, or pre-tax base).
- For finance-facing numbers, round to the right decimal places and note the rate assumption in the ticket or email.
All of that runs locally in your browser—useful when figures are sensitive or you simply do not want to paste them into a random online form. See Why “local only” matters for developer tools.
Related tools and reading
- Percentage Calculator — live percent change, ratio, tip/tax add, and reverse inclusive total.
- Estimating cloud spend from assumptions — another “quick numeric sanity check” workflow (assumption-based costs, not percents).
- Converting integers between binary, octal, decimal, and custom bases — when the number problem is radix, not percentages.
- Why “local only” matters for developer tools — privacy model for browser-side calculators.