Cellwise Try it free

Excel guide · 3 min read

How to calculate sales tax in Excel

Quick answerType your tax rate in its own cell, then multiply: =ROUND(amount*$G$2,2) gives the tax and =amount*(1+$G$2) gives the total including tax. To remove tax from a price that already includes it, divide by 1 plus the rate: =price/(1+$G$2).

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

ABCDEFGHI
1ItemQtyUnit priceLine totalTaxableTax ratePrice incl. tax
2Desk lamp234.9969.98Y0.0825108.25
3Printer paper (ream)58.4942.45Y
4Ergonomic chair1249249Y
5Coffee beans 1kg314.543.5N

Put the rate in one input cell

Rates depend on where you sell and what you sell, and they change. Type the rate that applies to you in one cell (G2 here, using 8.25% purely as a sample) and point every formula at it with $G$2. When the rate changes, you change one cell.

Type it as 8.25% or 0.0825. If you type 8.25, Excel treats it as 825%.

Tax on an amount

Multiply the amount by the rate and round to cents. Invoices and receipts show tax to the cent, so round the tax itself rather than only formatting it; formatting just hides the extra decimals and your totals can drift.

The ergonomic chair at $249.00 with an 8.25% rate:

=ROUND(D4*$G$2,2)

Result: 20.54

$249.00 x 8.25% = $20.54 tax.

Tax only the taxable lines

Mixed orders often have lines that are not taxed. Mark each line Y or N in a Taxable column (which items qualify is up to the rules where you sell; this sample marks the coffee beans N). SUMIFS adds only the Y lines, and you apply the rate to that subtotal.

Here $361.43 of the $404.93 order is taxable.

=ROUND(SUMIFS(D2:D5,E2:E5,"Y")*$G$2,2)

Result: 29.82

$361.43 x 8.25% = $29.82 tax on the order.

Order total including tax

Add the full subtotal and the tax. Keep the tax as its own rounded figure so the invoice adds up exactly when someone checks it by hand.

For a single taxable amount, =ROUND(D4*(1+$G$2),2) gets the total in one step: 1 + rate is the price plus the tax.

=SUM(D2:D5)+ROUND(SUMIFS(D2:D5,E2:E5,"Y")*$G$2,2)

Result: 434.75

$404.93 + $29.82 = $434.75 total.

Remove tax from a tax-inclusive price

If a price already includes tax, divide by 1 plus the rate to get the pre-tax amount. The tax part is the difference. $108.25 at 8.25% is $100.00 before tax and $8.25 of tax.

Do not multiply by (1 - rate). $108.25 x 91.75% gives $99.32, which is wrong because the tax was calculated on the smaller pre-tax amount, not on $108.25.

=ROUND(I2/(1+$G$2),2)

Result: 100

$100.00 before tax; the remaining $8.25 is the tax.

Round per line or on the total?

Rounding the tax on each line and adding can differ by a cent from rounding the tax on the order total. Neither is an Excel error. Pick the method your invoicing system or accountant uses and apply it consistently. To round per line, add a Tax column with =ROUND(D2*$G$2,2) for each taxable line and SUM it.

=SUMPRODUCT((E2:E5="Y")*ROUND(D2:D5*$G$2,2))

Result: 29.81

$29.81: one cent less than the $29.82 from rounding the order total, because each line rounds on its own.

Common mistakes

Rate typed as 8.25 instead of 8.25%

The tax comes out 100 times too big. Type 8.25% (or 0.0825) in the rate cell.

Removing tax with price x (1 - rate)

Tax was added to the pre-tax price, so take it off by dividing: =price/(1+rate).

Hard-coding the rate in every formula

=D2*0.0825 in 200 cells is painful when the rate changes. Use one input cell and $G$2.

Formatting instead of rounding

A cell showing $20.54 may hold 20.5425. Wrap tax in ROUND(...,2) so invoice totals add up to the cent.

FAQ

What is the formula for sales tax in Excel?

Tax = amount x rate, written as =ROUND(B2*$G$2,2) with the rate in G2. Total with tax = amount x (1 + rate).

How do I calculate the price before tax in Excel?

Divide the tax-inclusive price by 1 plus the rate: =price/(1+rate). With a 7% rate, $53.50 becomes $50.00.

How do I find the tax rate from the amounts?

Divide the tax by the pre-tax amount: =tax/amount, formatted as a percentage. Or use =total/pretax-1 if you have the total.

How do I add tax to a whole column?

Put the rate in one cell and use =ROUND(B2*(1+$G$2),2) next to the first price, then double-click the fill handle to copy it down.

Functions used

Related guides

Updated