How the USA self-employed (federal) calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Annual net business earnings (USD) | netEarnings | 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) |
|---|---|---|
| Se Tax Base | seTaxBase | $round(netEarnings * $const.seBase, 2) |
| Self-employment tax | selfEmploymentTax | $round($const.ssRate * $min([seTaxBase, $const.ssWageBase]) + $const.medicareRate * seTaxBase, 2) |
| QBI deduction (20%) | qbiDeduction | $round($const.qbiRate * $max([0, netEarnings - selfEmploymentTax / 2]), 2) |
| Taxable Income | taxableIncome | $round($max([0, netEarnings - selfEmploymentTax / 2 - qbiDeduction - $const.standardDeduction]), 2) |
| Federal income tax | federalIncomeTax | ($t := taxableIncome; $round($const.r1 * $min([$t, $const.b1]) + $const.r2 * $max([0, $min([$t, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$t, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$t, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $min([$t, $const.b5]) - $const.b4]) + $const.r6 * $max([0, $min([$t, $const.b6]) - $const.b5]) + $const.r7 * $max([0, $t - $const.b6]), 2)) |
| Net income / year (federal only) | netIncome | $round($max([0, netEarnings - selfEmploymentTax - federalIncomeTax]), 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 |
|---|---|
seBase | 0.9235 |
ssRate | 0.124 |
medicareRate | 0.029 |
ssWageBase | 184500 |
qbiRate | 0.2 |
standardDeduction | 16100 |
b1 | 12400 |
b2 | 50400 |
b3 | 105700 |
b4 | 201775 |
b5 | 256225 |
b6 | 640600 |
r1 | 0.1 |
r2 | 0.12 |
r3 | 0.22 |
r4 | 0.24 |
r5 | 0.32 |
r6 | 0.35 |
r7 | 0.37 |
Test vectors (3)
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 — 100,000 USD net earnings — a typical full-time contractor
given netEarnings | 100000 |
|---|---|
expect seTaxBase | 92350 |
expect selfEmploymentTax | 14129.55 |
expect qbiDeduction | 18587.05 |
expect taxableIncome | 58248.18 |
expect federalIncomeTax | 7526.6 |
expect netIncome | 78343.85 |
Case 2 — 40,000 USD — part-time
given netEarnings | 40000 |
|---|---|
expect seTaxBase | 36940 |
expect selfEmploymentTax | 5651.82 |
expect qbiDeduction | 7434.82 |
expect taxableIncome | 13639.27 |
expect federalIncomeTax | 1388.71 |
expect netIncome | 32959.47 |
Case 3 — 250,000 USD — above the Social Security wage base
given netEarnings | 250000 |
|---|---|
expect seTaxBase | 230875 |
expect selfEmploymentTax | 29573.38 |
expect qbiDeduction | 47042.66 |
expect taxableIncome | 172070.65 |
expect federalIncomeTax | 33894.96 |
expect netIncome | 186531.66 |
Sources
- IRS — Self-employment tax (Social Security and Medicare taxes) · checked 2026-08-22
- 2026 federal income tax brackets and standard deduction (Rev. Proc. 2025-32) · checked 2026-08-22
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 USA self-employed (federal) calculator
Built with Valem — a live, verifiable calculator you can fork and embed.