The order of the walk
- Income lines 1z to 8 are added into total income on line 9, with capital losses limited as the form allows.
- Half of self-employment tax is worked out from business profit, using the wage base for the year.
- Taxable social security is worked out with Publication 915 Worksheet 1, first without the IRA deduction, to give the MAGI for the IRA test, as Publication 590-A Appendix B requires.
- The IRA deduction is worked out for each spouse, then taxable social security again with that deduction.
- The student loan interest deduction is worked out on its own MAGI, which includes the IRA deduction.
- Line 10 adds the adjustments and line 11a is line 9 minus line 10.
- Each MAGI is built from AGI with its own add-backs; Schedule 1-A deductions use the MAGI from line 11b.
- The standard deduction, with the extra amount for age or blindness, or itemized deductions, and the Schedule 1-A total, give taxable income on line 15.
- Tax uses the Tax Table method under $100,000 of taxable income, the rate schedule above it, and the qualified dividends and capital gain worksheet when either is present.
Rounding
- Money is held in whole cents inside the engine, and decimals are read from their text, never through computer floating point, so a value like 18.845 rounds the way a person would expect.
- IRA deduction and Roth limits: up to the next $10, and at least $200 while any amount remains.
- Roth and student loan phaseout ratios: three decimal places, as on the IRS worksheets.
- Overtime and tips phaseouts: the excess counted in full thousands, rounded down. Car loan interest: rounded up.
- Percent of the poverty line: decimals dropped, never rounded up; over four times the poverty line is entered as 401.
- Tax Table: tax at the midpoint of the row, rounded to whole dollars.
- Results shown as Form 1040 lines are whole dollars when the amount is whole, and show cents where a worksheet produces them.
Where an IRS example and its rule disagree
Test IRA01. Pub 590-A (2025) Example 1 and its illustrated Worksheet 1-2 print $6,825 (19,500 x 35%), but line 4 of the same worksheet, and line 7 of the IRA Deduction Worksheet in the 2025 Form 1040 instructions, say to increase a result that is not a multiple of $10 to the next multiple of $10, giving $6,830. The calculator follows the rule.
Test ROTH01. The text says MAGI $150,000 and a reduced limit of $6,530; the filled-in Worksheet 2-2 shows MAGI $151,000, ratio 0.067, reduction 469, result $6,540. At MAGI $150,000 the limit is not reduced at all. The worksheet figures are internally consistent; the text is not. The calculator matches the worksheet.
Publication 590-A also prints the 2026 joint Roth ceiling as "$252,0000"; the correct figure, $252,000, is confirmed by the IRS notice.
All test cases
17 cases are IRS or CMS worked examples, 4 are examples printed on IRS forms, 3 are values read from official tables, and 14 are our own examples, worked by hand from the official rule. Every case passed in the build that produced this page.
| Test | What it checks | Kind | Inputs | Expected | Result |
|---|---|---|---|---|---|
| IRA01 | IRA deduction, 2025 | IRS or CMS worked example | status joint; covered yes; age 39; IRA MAGI $126,500; contribution $7,000; compensation $66,000 | deduction $6,830 | Pass |
| IRA02 | IRA deduction, 2025 | IRS or CMS worked example | status joint; covered no; spouse covered yes; age 39; IRA MAGI $126,500; contribution $7,000; compensation $51,500 | deduction $7,000 | Pass |
| IRA03 | IRA deduction, 2025 | IRS or CMS worked example | status joint; covered no; spouse covered yes; age 39; IRA MAGI $238,500; contribution $7,000; household compensation $45,500 | deduction $5,250; nondeductible $1,750 | Pass |
| IRA04 | IRA deduction, 2025 | IRS or CMS worked example | status joint; covered yes; age 39; IRA MAGI $238,500; contribution $7,000 | deduction $0; nondeductible $7,000 | Pass |
| IRA05 | IRA deduction, 2025 | IRS or CMS worked example | status single; covered yes; age 29; salary $72,000; IRA MAGI $90,000; contribution $7,000 | deduction $0 | Pass |
| IRA06 | IRA deduction, 2026 | Our example, worked from the official rule | status single; covered yes; age 40; IRA MAGI $86,000; contribution $7,500 | deduction $3,750 | Pass |
| ROTH01 | Roth limit, 2025 | IRS or CMS worked example | status single; age 45; compensation $150,000; Roth MAGI $151,000; other IRA contributions $0 | Roth limit $6,540; ratio 0.067 | Pass |
| ROTH02 | Roth limit, 2026 | Our example, worked from the official rule | status joint; age 52; compensation $300,000; Roth MAGI $247,000 | Roth limit $4,300; ratio 0.5 | Pass |
| SLI01 | Student loan interest, 2025 | IRS or CMS worked example | status joint; interest paid $800; MAGI $185,000 | deduction $400 | Pass |
| SLI02 | Student loan interest, 2025 | IRS or CMS worked example | status joint; interest paid $2,750; MAGI $185,000 | deduction $1,250 | Pass |
| SLI03 | Student loan interest, eligibility | IRS or CMS worked example | status single; interest paid $1,100; claimed as a dependent yes | deduction $0 | Pass |
| SLI04 | Student loan interest, 2026 | Our example, worked from the official rule | status joint; interest paid $2,500; MAGI $190,000 | deduction $1,250 | Pass |
| SLI05 | Student loan interest, 2025 | Our example, worked from the official rule | status single; interest paid $2,500; MAGI $92,000 | deduction $1,332.50; ratio 0.467 | Pass |
| SS01 | Taxable social security | IRS or CMS worked example | status single; benefits $5,980; pension $18,600; wages $9,400; taxable interest $990; adjustments $0 | taxable benefits $2,990; AGI $31,980 | Pass |
| SS02 | Taxable social security | IRS or CMS worked example | status joint; benefits $5,600; pension $15,500; wages $14,000; taxable interest $250; IRA deduction $1,000 | taxable benefits $0; AGI $28,750 | Pass |
| SS03 | Taxable social security | IRS or CMS worked example | status joint; benefits $10,000; pension $38,000; taxable interest $2,300; excluded bond interest $200 | taxable benefits $6,275 | Pass |
| OT01 | Qualified overtime | IRS or CMS worked example | overtime pay $15,000; rate 1.5 | qualified overtime $5,000 | Pass |
| OT02 | Qualified overtime | IRS or CMS worked example | overtime pay $20,000; rate 2 | qualified overtime $5,000 | Pass |
| OT03 | Qualified overtime | IRS or CMS worked example | comp time pay $4,500; rate 1.5 | qualified overtime $1,500 | Pass |
| OT04 | Overtime deduction | Our example, worked from the official rule | status single; qualified overtime $12,500; MAGI $160,999 | deduction $11,500 | Pass |
| OT05 | Overtime deduction | Our example, worked from the official rule | status joint; qualified overtime $30,000; MAGI $320,000 | deduction $23,000 | Pass |
| TIP01 | Tips deduction | IRS or CMS worked example | status single; qualified tips $26,000; MAGI $200,000 | deduction $20,000 | Pass |
| TIP02 | Tips deduction | IRS or CMS worked example | status single; qualified tips $10,000; MAGI $180,000 | deduction $7,000 | Pass |
| TIP03 | Tips deduction | Example printed on the IRS form | status single; qualified tips $25,000; MAGI $151,500 | deduction $24,900 | Pass |
| CAR01 | Car loan interest deduction | Example printed on the IRS form | status single; interest $10,000; MAGI $100,500 | deduction $9,800 | Pass |
| CAR02 | Car loan interest deduction | Example printed on the IRS form | status single; interest $10,000; MAGI $100,050 | deduction $9,800 | Pass |
| SEN01 | Senior deduction | Our example, worked from the official rule | status joint; both eligible yes; MAGI $170,000 | per person $4,800; deduction $9,600 | Pass |
| SEN02 | Senior deduction | Our example, worked from the official rule | status single; eligible yes; MAGI $175,000 | deduction $0 | Pass |
| SEN03 | Senior deduction | Our example, worked from the official rule | status single; eligible yes; MAGI $90,000 | deduction $5,100 | Pass |
| PTC01 | Percent of poverty line | Example printed on the IRS form | ratios 0.9984, 1.8565, 3.997 | percent 99, 185, 399 | Pass |
| PTC02 | Percent of poverty line, 2025 | Our example, worked from the official rule | household size 1; area 48 states; household income $60,241 | percent 401; poverty line $15,060 | Pass |
| IRM01 | Medicare Part B, 2027 | Official table value | status single; 2025 MAGI $112,000 | monthly premium $209.40 | Pass |
| IRM02 | Medicare Part B, 2027 | Official table value | status joint; 2025 MAGI $224,001 | monthly premium each $293.10 | Pass |
| SH01 | Tax by rate schedule, 2025 | Our example, worked from the official rule | status single; taxable income $50,000; method schedule | tax $5,914 | Pass |
| SH02 | Tax Table, 2025 | Official table value | taxable income $50,000; method table | single $5,920; joint $5,526; separate $5,920; head of household $5,663 | Pass |
| SH03 | Tax by rate schedule, 2026 | Our example, worked from the official rule | status single; taxable income $150,000; method schedule | tax $28,598 | Pass |
| AGI01 | Full AGI walk, 2025 | Our example, worked from the official rule | status single; W-2 box 1 $60,000; taxable interest $500; tax-exempt interest $300; HSA $3,000; student loan interest $2,500 | line 9 $60,500; line 10 $5,500; line 11a $55,000; ACA MAGI $55,300; taxable income $39,250 | Pass |
| SE01 | Self-employment tax, 2025 | Our example, worked from the official rule | net profit $50,000; W-2 social security wages $0 | SE tax $7,064.78; half deducted $3,532.39 | Pass |
What the engine does not model
- State AGI and state taxes
- The qualified business income deduction, credits, the alternative minimum tax and the net investment income tax
- Foreign earned income and other exclusions some MAGIs add back
- The dependent standard deduction
- The 2026 charitable deduction for non-itemizers, which is taken after AGI
- Part D income-related premiums
Sources and recheck schedule
Each source has a recheck interval by type: draft forms every two weeks until final, annual forms monthly in filing season, inflation figures quarterly and on fixed dates, and pending bills weekly. The build stops if a source is badly overdue. The changes are logged on the changelog. The shared rules file is version 2026.11.21-2.
Sources
- IRS, Publication 915 (2026), Social Security and Equivalent Railroad Retirement Benefits, checked November 21, 2026
- IRS, Publication 590-A (2025), checked November 21, 2026