← All how-to recipes

How to add tax to a price (and back it out again)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Compute a price including sales tax or VAT — and recover the pre-tax amount from a total.

The formula

AppFormulaNotes
Excel (desktop)=ROUND(A2*(1+B2),2)A2=net price, B2=tax rate (e.g. 9.5%). To back out: =ROUND(A2/(1+B2),2).
Google Sheets=ROUND(A2*(1+B2),2)Identical.
LibreOffice Calc=ROUND(A2*(1+B2),2)Identical.

How it works

Adding tax is multiplying by (1 + rate): $80 at 9.5% is 80 × 1.095 = $87.60. Going the other way, divide — don't multiply by (1 − rate): a $87.60 total at 9.5% is 87.60 / 1.095 = $80.00, whereas 87.60 × 0.905 gives the wrong $79.28. That asymmetry is the classic VAT-removal mistake. ROUND to 2 decimals in the formula so invoice lines sum to the displayed total.

Verified, not just documented

We ran =ROUND(A2*(1+B2),2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 87.6 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 87.6 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

ROUND — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons