How we check
The pay date and tax calculators are tested against answers worked out separately from the calculator code. Each test is listed below by name.
Counts below are read from those files when the site is built (). A table-driven test counts once, so each number is a floor.
Pay dates and paycheck calendars: 24 automated checks
Next-payday and paychecks-per-month answers are compared with dates counted by hand or by a plain day-by-day walk of the calendar, never with the calculator's own code.
- 7 checks. The next payday is never a date in the past, for weekly, biweekly, semimonthly and monthly schedules.
cal-207-pay-period-next-payday.test.tsShow the test names
- ${payFrequency}: a badly stale last-pay-date still yields a FUTURE payday
- does not skip ahead when the last payday is recent
- semimonthly pays on the 15th and the last day of the month
- monthly keeps the same day-of-month, clamped to short months
- weekly and biweekly stay on the entered weekday
- keeps gross/net per period and periods per year
- semimonthly is 24 periods, monthly 12, weekly 52
- 13 checks. Payday questions people search for (biweekly, semimonthly, third paycheck) return the expected dates.
cal-216-payday-tail.test.tsShow the test names
- renders on the pay-period page with a concrete date per frequency, not a generic invitation
- returns null off the payday cluster (does not leak onto unrelated calculator pages)
- states fixed paychecks-per-year facts for every frequency
- has at least 3 tail-shaped FAQs answering 'next payday' / 'how many paychecks'
- the new CAL-216 tail FAQs are answer-first: 40-60 words, no fewer, no more
- produces valid FAQPage JSON-LD
- no longer opens with an interaction command
- mentions paychecks/year and payday directly, matching the tail's own phrasing
- stays within a realistic meta description length
- expectedPageSetForYear returns the 4 canonical slugs for an arbitrary year
- buildEntriesForYear produces 4 valid calculator-config entries, cross-linked to each other
- the three-paycheck-months entry uses the generic, year-agnostic calculation module
- the existing 2027 three-paycheck-months entry already points at the generalized module
- 4 checks. Ten biweekly starting dates for 2027: the months with three paychecks match a brute-force walk of the calendar.
cal-293-three-paycheck-2027.test.tsxShow the test names
- has ten anchors: Mon-Fri, first or second week of January
- Friday answer: January/July/December or April/October
- renders the table before the generic box; speakable points at the answer (CAL-335: the answer itself now sits above the form)
Federal income tax: 82 automated checks
Bracket results are checked against worked examples computed from the published IRS tables: Rev. Proc. 2025-32 for tax year 2026 and Rev. Proc. 2026-35 for tax year 2027.
- 13 checks. Marginal tax and capital gains stack across brackets as the IRS tables describe, with the dollar result worked by hand.
calc-math-regression.test.tsShow the test names
- computes federal tax on $100K taxable single using stacked brackets
- marginal-tax calculator reports correct marginalRate at $100K single
- computes correct taxOnAdditional for $10K extra at $100K single
- short-term gain stacks correctly over ordinary income
- long-term LTCG uses 0/15/20 stacking, not single rate
- returns DIFFERENT benefits for ages 62, 67, 70
- Feb 29 2024 → Feb 28 2025 returns exactly 1 year
- age.ts handles Feb 29 birthday correctly in non-leap year
- default 5-day week: 20 days × 8h = 40h/week avg
- 6-day week: 20 days × 8h = 48h/week avg
- 4-day week: 20 days × 8h = 32h/week avg
- federal brackets cover all filing statuses
- married tax on $200K = ~$33,424
- 29 checks. Each tax year uses its own published figures, and a year switches on only when its figures are official.
cal-217-tax-year-registry.test.tsShow the test names
- found calculator engine files to scan
- no engine file imports _constants/tax-2026 or _constants/tax-2027 directly
- activeTaxYear() never returns an awaiting-irs year
- activeTaxYear() throws if every year in the registry is awaiting-irs
- activeTaxYear() throws rather than activate a year flipped to published with non-finite figures
- a staged year's figures are not publishable
- bracket math over NaN brackets throws rather than return a plausible-looking number
- a NaN standard deduction can't silently produce a real taxable-income number
- TAX_YEARS[2026].figures deep-equals the CAL-217 snapshot fixture
- TAX_YEARS[2027].figures deep-equals the snapshot typed from Rev. Proc. 2026-35 / SSA 91 FR 67380
- activeTaxYear().year === 2027
- activeTaxYear().status is published, with an irs.gov source and as-of date
- _constants/index re-exports resolve to the 2027 schedule
- all five configs exist and point at an engine reachable through the selector
- tax-bracket-2027 engine: $85,000 single = $5,987 + 22% x $32,975 = $13,241.50 (§3.01 Table 3)
- tax-brackets-married-filing-jointly-2027 (shares the tax-bracket-2027 engine): $150,000 MFJ = $11,974 + 22% x $45,950 = $22,083 (§3.01 Table 1)
- self-employment-tax-2027 engine: uses the 2027 SS wage base ($192,300)
- standard-deduction-2027 (shares the income-tax engine): single standard deduction is $16,600 (§3.15(1))
- capital-gains-brackets-2027 (planning entry point): a $51,000 gain is inside the 2027 0% band ($51,050 single, §3.03)
- uses 2026: the same gain owes 15% x ($51,000 - $49,450) = $232.50
- still uses 2026: 15% x $1,550 = $232.50
- uses 2027: $51,000 is under the $51,050 0% ceiling, so $0
- tax-bracket-2027 engine: $85,000 single taxable income matches the 2026 schedule
- tax-brackets-married-filing-jointly-2027 (shares the tax-bracket-2027 engine): $150,000 MFJ matches 2026
- self-employment-tax-2027 engine: uses the 2026 SS wage base and standard deduction
- standard-deduction-2027 (shares the income-tax engine): single filer standard deduction is the 2026 figure ($16,100)
- capital-gains-brackets-2027: 0% bracket ceiling is the 2026 figure ($49,450 single)
- the 2026 schedule itself is unchanged: $85,000 single = $13,412
- flipping a fixture year to published makes activeTaxYear() select it
- 10 checks. The 2026 and 2027 results shown next to their source, with expected values derived by hand from the Rev. Procs.
calc-40-tax-year-switch.test.tsxShow the test names
- static HTML: default $75,000 single is 2027 = 5,987 + 22% x 22,975 = $11,041.50; vs 2026 (1,240 + 4,560 + 22% x 24,600 = $11,212) the change is -$170.50
- picking 2026 recalculates to $11,212, labels it Rev. Proc. 2025-32 and drops the change line
- ${c.slug}: 2027 ${c.key} = ${c.y2027}, change vs 2026 ${c.change}
- ${c.engine} ${f.status} ${f.year}: ${c.key} = ${f.formula} = ${f.expected}
- 2027 head of household $100,000: change = 14,670 - 14,901 = -231
- no change line when 2026 itself is shown, or when the page names no compare output
- finds the engines (and their pages) from source
- ${module} (${purpose}) -> taxYear ${years[purpose]}
- labels the result Tax year 2027 · IRS Rev. Proc. 2026-35, the switch on 2027 by default
- $51,000 long-term gain, single, $0 income: 2026 = 15% x (51,000 - 49,450) = $232.50; 2027 = $0 (under the $51,050 0% ceiling)
- 11 checks. The 2027 bracket page says plainly whether its figures are projected or official.
cal-392-tax-2027-two-state.test.tsShow the test names
- answer block is 40-60 words and carries single + MFJ rates and the standard deduction
- title stays under 60 chars and every copy field says projected, never confirmed
- the article renders a labeled 2027 table with source and date, plus the official 2026 table
- the page is official and cites the Rev. Proc. on irs.gov
- answer block is 40-60 words, leads 'Official', and never says projected
- the article renders the official 2027 heading, Rev. Proc. source line, and still the official 2026 table
- the calculator defaults to 2027 and still computes 2026 when asked
- brackets ascend and the source has a fetched URL and dates
- official requires the registry: published, same ceilings, same standard deduction
- tax.json mirrors the derived strings (search index and llms.txt read the JSON); on a flip, paste these values
- applyTax2027PageState sets lastModified and rewrites the lead FAQ only
- 19 checks. Every dollar example in the tax guide agrees with the calculator next to it.
cal-231-tax-prose.test.tsShow the test names
- $65,000 − $16,100 standard deduction = $48,900 taxable, marginal 12% (below the $50,400 22% line)
- the article states 12% for that example and no longer says 22%
- single, $85,000 taxable → $1,240 + $4,560 + $7,612 = $13,412; marginal 22%
- married filing jointly, $150,000 taxable → $2,480 + $9,120 + $10,824 = $22,424; marginal 22%
- the bracket thresholds the article prints are the engine's thresholds
- every 2027-named tool carries a data-vintage note beside the inputs
- no 2027-named tool promises an exact liability
- tax-2026 stays separately versioned: the 2026 schedule is unchanged
- ${slug}: exists in tax.json
- ${slug}: a 2027 brackets/rates claim in title, metaTitle, description or metaDescription is backed by the 2027 status
- ${slug}: copy names the tax year it calculates and its source
- ${slug}: no copy or FAQ still calls 2027 projected or unpublished
- ${slug}: FAQ questions are unique
- ${slug}.md: first H2 only claims 2027 brackets/rates when they are official and cited
- ${slug}.md: opening paragraph names the 2026 tax year
- ${slug}.md: opening paragraph states the tax-year-2027 publication status
- ${slug}.md: no stale "projected / not yet published" claim about 2027 once official
- the flagship article contains no fabricated tax-year-2027 dollar figures or TCJA-sunset speculation
- the flagship config's FAQ no longer prints projected tax-year-2027 dollar thresholds
Found a wrong answer? Tell us and we will add a test for it.