How the United States take-home pay calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Gross annual salary (USD) | grossAnnual | number |
The formula
Each derived value below is computed by the Valem engine from the expression shown, in this order. Nothing else runs — there is no hidden code path.
| Derived value | Field | Formula (JSONata) |
|---|---|---|
| Taxable (after standard deduction) | taxable | ($b := grossAnnual - $const.standardDeduction; $round($b > 0 ? $b : 0, 2)) |
| Federal income tax | federalTax | ($t := taxable; $round((($t < 12400 ? $t : 12400) * 0.10) + (($t > 12400 ? (($t < 50400 ? $t : 50400) - 12400) : 0) * 0.12) + (($t > 50400 ? (($t < 105700 ? $t : 105700) - 50400) : 0) * 0.22) + (($t > 105700 ? (($t < 201775 ? $t : 201775) - 105700) : 0) * 0.24) + (($t > 201775 ? (($t < 256225 ? $t : 256225) - 201775) : 0) * 0.32) + (($t > 256225 ? (($t < 640600 ? $t : 640600) - 256225) : 0) * 0.35) + (($t > 640600 ? ($t - 640600) : 0) * 0.37), 2)) |
| Social Security | socialSecurity | $round((grossAnnual < $const.ssWageBase ? grossAnnual : $const.ssWageBase) * $const.ssRate, 2) |
| Medicare | medicare | $round(grossAnnual * $const.medicareRate + (grossAnnual > 200000 ? (grossAnnual - 200000) * $const.medicareSurcharge : 0), 2) |
| Net / year | netAnnual | $round(grossAnnual - federalTax - socialSecurity - medicare, 2) |
| Net / month | netMonthly | $round(netAnnual / 12, 2) |
Rates and thresholds
The expressions above read these as $const. They are the figures the annual refresh replaces, so they live as data rather than being written into the formulas — which is what makes a year-on-year change a one-line diff instead of an edit to arithmetic.
| Constant | Value |
|---|---|
standardDeduction | 16100 |
ssWageBase | 184500 |
ssRate | 0.062 |
medicareRate | 0.0145 |
medicareSurcharge | 0.009 |
Test vectors (2)
Every case is executed against this model on each build, by the Java engine and independently by a JavaScript one. A mismatch of a single cent fails the build, so the page cannot ship advertising a figure the model no longer produces.
Case 1 — S1 75,000 USD single, no state tax (TX)
given grossAnnual | 75000 |
|---|---|
expect taxable | 58900 |
expect federalTax | 7670 |
expect socialSecurity | 4650 |
expect medicare | 1087.5 |
expect netAnnual | 61592.5 |
Case 2 — S3 250,000 USD — SS cap + Medicare surcharge
given grossAnnual | 250000 |
|---|---|
expect federalTax | 51304 |
expect socialSecurity | 11439 |
expect medicare | 4075 |
Sources
- IRS — inflation adjustments · checked 2026-08-02
- SSA — wage base · checked 2026-08-02
Check it yourself — and reuse it
The whole model as JSON — inputs, outputs, formulas, vectors and sources in one re-runnable document.
This model is published under CC BY 4.0: use it, adapt it, build on it, with attribution. The licence covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds are law, and nobody licenses those; the sources above are where they come from.
← Back to the United States take-home pay calculator
Built with Valem — a live, verifiable calculator you can fork and embed.