Method Deck / tax

Marginal vs. effective tax rate, by tax year

Computes both the marginal tax rate (the rate on the last dollar earned) and the effective tax rate (total tax divided by taxable income) using the published IRS brackets for a chosen tax year.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Disclaimer: General federal tax formula only, using the officially published IRS brackets for the chosen tax year. Not tax advice. Consult a licensed tax professional or the IRS for your actual return.

Try it

Inputs

Outputs

Steps

  1. The visitor supplies tax_year (which published IRS bracket table to use) plus tax_year_source and tax_year_date, the citation for that table; this method never looks up or fetches a table itself.
  2. Select the bracket table for tax_year and filing_status.
  3. Find the bracket row where taxable_income falls; that row's rate is the marginal_rate_percent. Boundaries are inclusive of the upper bound: income exactly at a bracket's upper threshold is taxed and rated in that (lower) bracket, matching the IRS table's 'not over' wording; the next bracket applies only to income strictly greater than the threshold.
  4. tax_owed = the row's base amount plus its marginal rate times (taxable_income minus the row's lower bound), rounded to 2 decimals.
  5. effective_rate_percent = tax_owed / taxable_income * 100, rounded to 2 decimals.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"filing_status":"single","taxable_income":75000,"tax_year":"2026","tax_year_source":"IRS Rev. Proc. 2025-32, Section 4.01","tax_year_date":"2026-09-30"}Marginal rate 22.00%, effective rate 14.95%
test vector: head of household lower income{"filing_status":"head_of_household","taxable_income":30000,"tax_year":"2026","tax_year_source":"IRS Rev. Proc. 2025-32, Section 4.01","tax_year_date":"2026-09-30"}Marginal rate 12.00%, effective rate 10.82%
test vector: single filer exactly at a bracket boundary{"filing_status":"single","taxable_income":50400,"tax_year":"2026","tax_year_source":"IRS Rev. Proc. 2025-32, Section 4.01","tax_year_date":"2026-09-30"}Marginal rate 12.00%, effective rate 11.51%

Published card