calcfi-tax-bracket
v0.1.0
Published
Compute US federal income tax owed at progressive brackets. Returns total tax, marginal rate, and effective rate. Brackets for single/MFJ/Ho
Maintainers
Readme
calcfi-tax-bracket
US federal income tax bracket math — marginal rate, effective rate, total tax owed. 2024-2026 brackets per IRS Rev. Proc. MIT.
CalcFi US Federal Tax Bracket Calculator — a single-purpose, MIT-licensed helper for Compute US federal income tax owed at progressive brackets. Returns total tax, marginal rate, and effective rate. Brackets for single/MFJ/HoH filing statuses, projected through 2026 per IRS Rev. Proc. 2025-32.
What this does
Compute US federal income tax owed at progressive brackets. Returns total tax, marginal rate, and effective rate. Brackets for single/MFJ/HoH filing statuses, projected through 2026 per IRS Rev. Proc. 2025-32.
Formula — Progressive bracket math:
tax = Σ (min(income, bracket_top) − bracket_bottom) × bracket_ratePrimary source: IRS Rev. Proc. 2025-32 (2026 projections) and prior years
Install
npm install calcfi-tax-bracketUsage
import { federalTax, standardDeduction } from "calcfi-tax-bracket";
const taxable = 85_000 - standardDeduction("single"); // 70_000
federalTax(taxable, "single"); // { totalTax, marginalRate: 0.22, effectiveRate }Live calculator
Try the interactive web calculator with full UI at https://calcfi.app/calculators/tax-bracket — no signup required.
Why this package exists
Most personal-finance calculators are buried in advertising-heavy lead-generation sites. The math is freely published by federal agencies and textbooks, but the implementations are wrapped in proprietary opaque code. CalcFi publishes these utility libraries to make every formula:
- Reproducible — show the math
- Cited — link to primary sources
- Free — MIT license, no paid tier
- Auditable — every line of code is open source
The math here is undergraduate-level. The contribution is the citation discipline and the open distribution.
Part of the CalcFi ecosystem
This package is one of 8 single-purpose helper utilities. Cross-mesh:
Sibling Python packages
- calcfi-mortgage-payment — Standard amortizing-loan monthly payment formula. Free, cited, MIT.
- calcfi-compound-interest — Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.
- calcfi-rule-of-72 — Rule of 72 — approximate years to double an investment at a given rate. Plus exact ln(2) version. MIT.
- calcfi-apr-apy — Convert between APR (simple annual rate) and APY (effective annual yield including compounding). MIT.
- calcfi-real-return — Inflation-adjusted (real) return from nominal return. Formula: real = (1+nominal)/(1+inflation) − 1. MIT.
- calcfi-amortization — Generate a full amortization schedule for a fixed-rate loan: payment, principal, interest, balance per period. MIT.
- calcfi-debt-payoff — Snowball vs avalanche debt payoff strategies. Compute months and total interest. MIT.
Sibling npm packages
- calcfi-mortgage-payment — Standard amortizing-loan monthly payment formula. Free, cited, MIT.
- calcfi-compound-interest — Compound interest with periodic contributions. Future value, present value, time-to-target. Free, MIT.
- calcfi-rule-of-72 — Rule of 72 — approximate years to double an investment at a given rate. Plus exact ln(2) version. MIT.
- calcfi-apr-apy — Convert between APR (simple annual rate) and APY (effective annual yield including compounding). MIT.
- calcfi-real-return — Inflation-adjusted (real) return from nominal return. Formula: real = (1+nominal)/(1+inflation) − 1. MIT.
- calcfi-amortization — Generate a full amortization schedule for a fixed-rate loan: payment, principal, interest, balance per period. MIT.
- calcfi-debt-payoff — Snowball vs avalanche debt payoff strategies. Compute months and total interest. MIT.
Companion data
The mortgage rate, inflation, Treasury yield, and macro data used to validate these calculators are published as CalcFi Open Data — 34 free CC BY 4.0 time series, 117,956 observations, 5 permanent DOIs.
- CalcFi Open Data on Hugging Face
- Python
calcfidataSDK - npm
calcfidataSDK - Live SQL endpoint (Datasette)
- DOI 10.6084/m9.figshare.32332290
Calculators on CalcFi (free, no signup)
Every formula in these packages has a live web calculator at calcfi.app:
- Mortgage Payment
- Compound Interest
- Tax Bracket
- Amortization Schedule
- APR vs APY
- Rule of 72
- Inflation-Adjusted Return
- Debt Payoff
License
MIT. Author: Jere Salmisto (ORCID 0009-0000-0916-8684), founder of CalcFi. Based in Helsinki, Finland.
Citation
If you cite this package in research:
Salmisto, J. (2026). calcfi-tax-bracket: CalcFi US Federal Tax Bracket Calculator.
DOI: 10.6084/m9.figshare.32332290 (parent CalcFi Open Data dataset).
Available: https://calcfi.app/calculators/tax-bracketOr use the CITATION.cff on the parent dataset for the BibTeX entry.
