QuantCalc QuantCalc Federal tax engine docs

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 (158 distinct documents, each quote re-checked weekly) and the tests that prove it. Engine version 2.3.2.

What it computes

In the planner (/api/simulate and the app) every simulated year runs the base return: the income, capital-gain, AGI, deduction, tax and other-tax steps, with the standard deduction, the §63(f) aged amount and the senior deduction (no blindness amount, no itemizing), taxable-account interest and dividends when the plan sets a taxable yield (it defaults to 0), and the capital-loss deduction with its carryover on each simulated path. The itemized-deduction, retirement-account and estimated-tax steps run on the federal tax API and in the library only: the planner's own required minimum distributions use the Uniform Lifetime Table on the household's combined traditional balance at the primary owner's age (a spouse's own IRA and employer plans are not split out by owner), and its §72(t) charge has no exceptions. The ACA bridge optimizer also applies the Roth ordering rules and the Joint and Last Survivor Table. The planner and the bridge compute line 16 on the rate schedules in every year, not the Tax Table the federal tax API uses below $100,000 (a difference of at most $6 in a year). In the planner a QCD is capped per IRA owner (a joint return with both spouses 70½ or older may exclude twice the limit; the indexed limit is rounded to the nearest $1,000), a separate filer who lived apart from the spouse all year pays IRMAA on the individual table, and the RMD divides the balance before the year's returns (engine 1.5.0). Federal engine 2.1: a Rental income life event is rental real estate on each year's return (Schedule E through Form 8582: the passive-activity loss limit with active participation, the carryforward on each path; net investment income; the state return takes Schedule E line 26 as other income, a loss down to that income's zero). The planner figures the credits in a year with wages or self-employment income (federal engine 2.2): the earned income credit without a qualifying child (it has no dependents; refundable, so the year's federal total can be a refund), the saver's credit on the plan's contributions of the year before retirement (the primary's; through 2026), and the credit for the elderly, which cannot lower the tax of a filer 65 or older on the standard deduction (PROP-F21-R-1); other years have no earned income and no contribution, so no credit.

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 statusStandard deduction§63(f) amount per person 65+NIIT thresholdOrdinary brackets
single$16,100$2,050$200,0007 brackets, 10% to 37%
married filing jointly$32,200$1,650$250,0007 brackets, 10% to 37%
married filing separately$16,100$1,650$125,0007 brackets, 10% to 37%
head of household$24,150$2,050$200,0007 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 taken before age 59½; without a birth month the engine charges the whole year in which the filer reaches 59 or less and nothing from the year the filer reaches 60, and with one only the part of the year before 59½ (how).

What it does not compute yet

A figure that leaves something out must say so. The engine does not model:

The API has no field for any of these, and it refuses a request key it does not know (such as wages) with 400. It cannot detect income, credits or taxes that are simply not sent: a household with wages, rental income or a foreign tax credit that sends only the fields that exist gets a 200 with a tax that leaves them out, so a figure is complete only for a household whose whole return is within the fields listed. Nor can it tell what an amount contains: a 28% rate gain sent as longTermGains is taxed at the capital-gains rates, and where an input stands for a rule's result (deductible mortgage interest, a substantially equal payment, a qualifying surviving spouse) meeting the rule's conditions is the caller's responsibility.

Later tax years

The engine's rules are 2026's. For a later year it moves each dollar amount the way its statute moves it: the brackets, the standard deduction, its age-65 and blindness amounts and the capital-gain breakpoints are indexed from their statutory base years by the chained CPI with the statute's rounding; the Net Investment Income Tax thresholds, the Social Security taxation thresholds and the capital-loss limit are fixed in law and never move; the senior deduction ends after 2028 and the SALT cap follows its enacted schedule. At a factor of 1 every indexed amount of a later year is its 2026 amount. The planner uses this projection for every year after 2026, and the API takes projection (reference). Every amount, its rule and its source: later years.

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 every line and branch of its 5 source files is executed by its tests: verification.