Methodology
How the math on Mathstub gets sourced, tested, and updated. The short version: every number cites the IRC section or IRS publication that controls it, every calculation is unit-tested against worked examples, and bracket data is rebuilt each tax year from primary sources.
Sources we use
Every tax rate, bracket, threshold, and rule on Mathstub traces back to one of these primary sources:
- Internal Revenue Code (IRC) — the statute. We cite by section (e.g. IRC §83(a) for vest-time taxation of property transferred for services).
- Treasury Regulations (Treas. Reg.) — Treasury interpretations binding on the IRS. Cited by reg number (e.g. Treas. Reg. §31.3402(g)-1 for supplemental withholding).
- IRS Publications — plain-language guides. Pub 15 (Employer's Tax Guide), Pub 15-T (Federal Income Tax Withholding Methods), Pub 17 (Your Federal Income Tax), Pub 505 (Tax Withholding and Estimated Tax), Pub 525 (Taxable and Nontaxable Income), Pub 550 (Investment Income).
- IRS Revenue Procedures and Notices — annual inflation-adjusted thresholds (Rev. Proc. 2024-40 sets the 2025 tax-year brackets; the corresponding 2026 procedure sets 2026 brackets).
- State revenue department publications — for state-specific supplemental withholding, AMT, and LTCG treatment. Linked directly on each state page.
Random tax blogs, financial-product marketing pages, and Reddit threads are not sources. We use them at most as tone validators or pointers to a primary source.
Tax-year versioning
Federal brackets, FICA wage bases, AMT exemptions, and standard deductions change every tax year. Mathstub maintains a separate constants module for each year (2024, 2025, 2026) so calculators can swap year without recomputing logic. When a new tax year is published, we update the constants in a single PR and rerun the full unit-test suite to catch regressions.
The “Last updated” badge on each calculator and blog post reflects the date the underlying math was last touched — not a cosmetic refresh. We do not bump dates to game freshness signals.
Testing
Pure math lives in lib/tax/ with no React or browser dependencies — the same engine could later power the Chrome extension and the Anthropic skill we plan to ship. Each module has a Vitest test file (tests/tax/) covering:
- Zero and negative inputs (defensive guards via TaxCalcError).
- Year-boundary edge cases (bracket transitions, FICA wage-base crossings).
- Very large vests ($1M+ supplemental threshold for 37% federal).
- Currency-rounding parity across federal, state, and FICA.
- Cross-checks against worked examples from IRS Pubs and CPA blogs.
The current suite is 446 tests across 17 files — calculator modules, blog content invariants (every post has a Sources citation, every cross-reference resolves, every post is assigned to exactly one category), and accessibility helpers. Coverage on the calculation layer is high; we deliberately do not over-test the React UI because the math layer is where the trust lives.
Editorial review
Every blog post and calculator on Mathstub currently shows “Reviewed against IRS primary sources” in the byline. This is the honest framing: until Mathstub revenue justifies a real CPA on retainer, the math is reviewed by the founder against IRS source material rather than by a credentialed professional.
When traffic and revenue support it, we will engage a CPA who specializes in equity compensation to formally review the calculation logic and content. At that point the byline will name the reviewer and link to their bio.
Until then: if you spot a math error or a misread IRC citation, email me directly. Every correction gets read and shipped.
What this is not
Mathstub is a planning reference. It is not tax advice for your specific situation. Real tax decisions depend on facts the calculator does not capture — state residency sourcing, multi-state allocation, AMT interactions across grants, pre-IPO equity restrictions, prior- year carryovers, and dozens of other variables.
For high-stakes decisions ($10,000+ in tax owed, multi-state moves, ISO exercises, pre-IPO planning), talk to a CPA licensed in your state who knows equity compensation. The About page links the affiliate CPA-matching service we recommend.
When math changes
The IRS adjusts brackets, FICA wage bases, AMT exemptions, and contribution limits every year — typically October or November for the following tax year. When new numbers drop, we update the constants module and bump the “Last updated” date on affected pages within ~2 weeks. If a tax law change materially affects an existing calculator (e.g. a SECURE 2.0 style reform), we publish a blog post explaining what changed and what the new math says.
How to verify the math yourself
Three quick checks for any calculation on this site:
- Read the cited IRC section. Every blog post ends with a Sources block. Cross-check the section number on law.cornell.edu/uscode/text/26 (Cornell hosts the IRC for free).
- Run the worked example. Most calculator pages have a “Show the math” panel that displays every intermediate number. Verify the final answer by hand against an IRS Pub worked example.
- Cross-check against another tool. For RSU shortfall, try the same inputs in TurboTax's tax estimator or a CPA blog calculator. We aim to be within $50–$200 of those for typical scenarios. Larger differences usually indicate one tool handles an edge case differently — email me and I will dig in.
Spotted a bug, edge case, or numbers that look off? Tell us — we read every report.