How to calculate progressive tax with brackets in one formula
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Marginal tax the way real systems work — each bracket taxes only the income inside it.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =SUMPRODUCT(--(A2>D2:D4),(A2-D2:D4),E2:E4) | D = bracket thresholds (0, 10000, 40000...), E = RATE INCREASES at each threshold (0.10, 0.10, 0.05 for rates 10/20/25%). |
| Google Sheets | =SUMPRODUCT(--(A2>D2:D4),(A2-D2:D4),E2:E4) | Identical. |
| LibreOffice Calc | =SUMPRODUCT(--(A2>D2:D4),(A2-D2:D4),E2:E4) | Identical. |
How it works
The trick is storing each bracket's rate INCREASE rather than its rate: 10%, then +10% (to 20%), then +5% (to 25%). Each increase applies to all income above its threshold, and SUMPRODUCT adds the pieces: 50,000×10% + 40,000×10% + 10,000×5% = $9,500 — exactly the bracket-by-bracket answer (10k@10% + 30k@20% + 10k@25%). Edit the threshold/increase table, not the formula, when rates change. Effective rate is the result ÷ income (19% here), and the marginal rate is the sum of increases passed.
Verified, not just documented
We ran =SUMPRODUCT(--(A2>D2:D4),(A2-D2:D4),E2:E4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 9500 — 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 9500 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
SUMPRODUCT — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to check if a cell contains any word from a list
- How to count cells that contain errors
- How to count the total words in a range
- How to multiply two columns (and total the result)
- How to reference a cell on another sheet