To charge sales tax on parts but not labor in Excel, mark every invoice line Taxable, Yes or No, and tax only the Yes lines. Add them up with =SUMIF(E2:E5,"Yes",D2:D5) and multiply by your rate, kept in a cell of its own: =ROUND(H3*H1,2). Labor marked No is never taxed, whatever else changes on the invoice.
The six steps below also cover what a single tax formula gets wrong: a discount, a job at a different rate, a tax-exempt customer, and the tax for a period. The example is an electrical job. A roll of wire and two breakers are taxed; four hours of labor and a trip charge are not. The tax rate, 6.5%, is in H1.
The table
One row per line on the invoice. Amount is =B2*C2, filled down. The totals go in column H.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Item | Qty | Price | Amount | Taxable |
| 2 | 12-gauge copper wire (250ft) | 1 | 96.67 | 96.67 | Yes |
| 3 | 20A circuit breaker | 2 | 21.50 | 43.00 | Yes |
| 4 | Standard labor (hours) | 4 | 85.00 | 340.00 | No |
| 5 | Trip charge | 1 | 45.00 | 45.00 | No |
Step 1: Mark every line Yes or No
Add a Taxable column (E). To keep it to Yes or No, select E2:E5, choose Data, Data Validation, List, and type Yes,No as the source. Each line now says whether it is taxed.
Step 2: Tax only the lines marked Yes
Subtotal (H2)
=SUM(D2:D5)
$524.67 for the whole job.
Taxed part (H3)
=SUMIF(E2:E5,"Yes",D2:D5)
$139.67: only the wire and the breakers.
Tax (H4)
=ROUND(H3*H1,2)
$9.08 at the 6.5% rate in H1.
Total (H5)
=H2+H4
$533.75, the amount on the invoice.
One formula on the subtotal
=ROUND(H2*H1,2) would charge $34.10, because it taxes the labor too.
Without SUMIF
=SUMPRODUCT((E2:E5="Yes")*D2:D5) gives the same taxed part.
Step 3: Handle a discount
A discount comes off the subtotal, so the taxed part shrinks by the same share. Put the discount’s type in H7 (% or $) and the discount in H8 (10% or 50).
Discount (H9)
=IF(H7="%",ROUND(H2*H8,2),H8)
$52.47 for 10% off.
Taxed part after the discount (H10)
=H3*(1-H9/H2)
$125.70: the wire and breakers, less their share of the discount.
Tax (H11)
=ROUND(H10*H1,2)
$8.17.
Total (H12)
=H2-H9+H11
$480.37.
Percent or dollars
With a $50 discount instead, the tax is $8.21 and the total $482.88. This taxes the price after the discount; whether your state does that depends on the kind of discount (see the first question below).
Step 4: Use a different rate for one job
Keep the rate in one cell, H1, and never type it into a formula. For a job where the rate is different, change H1 on that invoice. At 7%, the tax on the discounted parts is $8.80 and the total $481.00.
Step 5: Switch the tax off for an exempt customer
Add an Exempt cell, H14 (Yes or No), and wrap the tax in IF:
Tax (H11)
=IF(H14="Yes",0,ROUND(H10*H1,2))
$0.00 for an exempt customer, and a total of $472.20.
Your state’s revenue department says what paperwork an exempt customer has to give you.
Step 6: Add up the tax for a period
Keep a log with one row per invoice: the date in K, the invoice number in L and its tax in M.
| K | L | M | |
|---|---|---|---|
| 1 | Date | Invoice | Tax |
| 2 | 06/16/2026 | INV-1 | 0.00 |
| 3 | 07/06/2026 | INV-2 | 81.34 |
| 4 | 07/22/2026 | INV-3 | 21.90 |
| 5 | 08/12/2026 | INV-4 | 6.78 |
| 6 | 09/08/2026 | INV-5 | 2.47 |
| 7 | 10/02/2026 | INV-6 | 9.08 |
Put the period’s first and last days in O1 and O2:
Tax for the period (O3)
=SUMIFS(M2:M7,K2:K7,">="&O1,K2:K7,"<="&O2)
$112.49 from July 1 to September 30.
More on SUMIFS: totals with multiple criteria.
Common questions
Is sales tax figured before or after a discount?
It depends on your state and on the kind of discount, so check with your state’s revenue department or your accountant. The sheet can do either. Step 3 taxes the price after the discount; to tax the full price, use the taxed part from Step 2 instead.
Which rate do I charge for a job in another city?
Your state’s rules decide which local rate applies, so check with its revenue department. Keep the rate in one cell, as in Step 4, and each invoice can use the rate its job needs.
Do I charge tax on a trip charge or a service fee?
It depends on your state and on what the fee is for. Put each fee on its own line and mark it Yes or No in the Taxable column, and the tax follows the mark.
Sales tax, set once
EG Quote & Invoice builds this in. Your rate lives in Settings, every item in your catalog carries its own tax setting, and the tax is worked out on the taxed lines only. A discount, a rate for one job and a tax-exempt customer are each a switch or a cell on the invoice. Reports adds up the tax on your invoices for this year, last year and all time, and Pro’s year-end tax pack gives it month by month for any dates you choose.
Invoice pages by trade: electricians and HVAC contractors.
See EG Quote & InvoiceWhen Formulas Aren’t Enough
These formulas cover one invoice. Sales tax across a business also needs:
- Rates by location: the right rate for each job’s address, looked up instead of typed
- Exempt customers remembered: the exemption on file, applied to every invoice for that customer
- Tax by period and by rate: the totals each return asks for, ready when it is due
- Checks before sending: a warning when a line has no Taxable mark
A custom VBA system handles all of it inside Excel, built around the way you invoice.
“Highly recommended, David was excellent throughout the entire process, taking the time to understand the brief and delivered exactly what was required.”
Bespoke Excel Client · Upwork
Need an Invoicing Tool That Gets the Tax Right?
Tell us how you invoice and where you work, and we’ll build a tool that handles the tax for you.
Small fixes start at $69.
Every project gets a fixed-price quote before any work starts: the price you approve is the price you pay.