Docs / Federal tax
Federal tax engine documentation
QuantCalc computes each year's federal income tax with one engine: a 2026 Form 1040 composed from the year's income, rule by rule, in the order the form computes it. The planner uses it for every simulated year, and the federal tax API runs it on a single return. These pages document every step it takes, the form line each value lands on, the official source of each rule (20 distinct documents, each quote re-checked weekly) and the tests that prove it. Engine version 1.1.0.
What it computes
- Income: Form 1040 lines 2a to 8. Tax-exempt interest; IRA distributions and Roth conversions; Pensions and annuities; Social Security benefits; Taxable Social Security (the Pub 915 worksheet); Other ordinary income.
- Capital gains: Schedule D netting. Net short-term gain or loss; Net long-term gain or loss; Combined net gain or loss; Line 7a: a net loss enters as zero.
- Total income and adjusted gross income. Total income; Adjusted gross income.
- Deductions: the standard deduction, §63(f) and the senior deduction. Standard deduction and the §63(f) aged amount; The senior deduction (Schedule 1-A); Additional deductions on line 13b; Total deductions; Taxable income.
- Tax: the brackets and the capital-gains worksheet. Tax: the brackets and the capital-gains worksheet.
- Other taxes: §72(t) and the NIIT. The 10% additional tax on early distributions; Net investment income tax; Other taxes; Total tax.
The whole order, step by step: calculation order.
The 2026 parameters it uses
Read from the engine itself (GET /api/federal-tax/rules), not typed onto this page.
| Filing status | Standard deduction | §63(f) amount per person 65+ | NIIT threshold | Ordinary brackets |
|---|---|---|---|---|
| single | $16,100 | $2,050 | $200,000 | 7 brackets, 10% to 37% |
| married filing jointly | $32,200 | $1,650 | $250,000 | 7 brackets, 10% to 37% |
| married filing separately | $16,100 | $1,650 | $125,000 | 7 brackets, 10% to 37% |
| head of household | $24,150 | $2,050 | $200,000 | 7 brackets, 10% to 37% |
The senior deduction: $6,000 per individual 65 or older, tax years 2025 to 2028, reduced by 6% of MAGI over $75,000 ($150,000 joint); not on a separate return. The §72(t) additional tax: 10% of an IRA distribution in a year that ends before age 60.
What it does not compute yet
A figure that leaves something out must say so. The engine does not model:
- Wages, self-employment income, FICA and the Additional Medicare Tax (planned: R4)
- Taxable interest, ordinary and qualified dividends (and so their share of the NIIT and the capital-gains worksheet) (planned: R1)
- The $3,000 capital-loss deduction and loss carryovers (a net loss enters as zero) (planned: R2)
- Itemized deductions (Schedule A) and the non-itemizer charitable deduction (planned: R3)
- The §72(t) exceptions (rule of 55, substantially equal payments, disability), IRA basis (Form 8606) and the missed-RMD excise tax (planned: R5)
- The §63(f) amount for blindness and the qualifying surviving spouse status (planned: R6)
- Credits (child and other dependent credits, the credit for the elderly, the saver's credit, the premium tax credit reconciliation) and the alternative minimum tax (planned: R7)
- Estimated-tax payments and the underpayment penalty (planned: R8)
- Adjustments to income (Schedule 1 Part II), the qualified business income deduction and the Schedule 1-A tips, overtime and car-loan interest deductions
The API refuses a request that carries any of these rather than returning a tax that silently leaves it out.
With the state engine
The state tax engine takes the federal figures some states need (the federal tax, federal taxable
income, the taxable part of Social Security) from this engine inside the planner. On the state tax
API, computeFederal: true does the same for a single request: see the API reference.
How it is verified
Every step has a unit test, the engine is held bit for bit to a recorded corpus of planner results, and its code is fully covered by tests: verification.