Compute · Assess & Decide · Analysis & Finance
Compute self-employment tax and quarterly estimated payments for a supplied tax year
You get your self-employment tax for the supplied net earnings plus the four equal quarterly estimated payments, computed for the tax-year rates and thresholds you provide.
You receive: A pure function that takes net self-employment earnings and the tax-year parameters and returns the SE tax (with its Social Security, Medicare, and surtax components) and the required quarterly estimated payment.
Part of Choose Business Model
What's verified: STUD verifies the ARITHMETIC of this SE-tax and quarterly-payment computation for the tax-year rates and thresholds the buyer supplies, using the actual IRS method: net self-employment earnings are the net profit times 92.35 percent (the deductible employer-equivalent half is removed) before the Social Security and Medicare rates apply, the Social Security portion is capped at the wage base, and the 0.9 percent Additional Medicare portion applies above the surtax threshold and is included in the SE-tax total. STUD does NOT verify that the supplied rates, wage base, or thresholds are the correct current-year IRS figures (the 2020 values are defaults only); does NOT apply the income-tax deduction for one-half of the SE tax; does NOT handle W-2 wages that reduce the remaining Social Security wage base; assumes the single-filer Additional Medicare threshold unless you change it; and does NOT cover state estimated taxes or the safe-harbor / prior-year payment rules. The estimated payment is a flat one-fourth of the buyer supplied expected-tax figure (STUD does not check that the figure is accurate, only that the quarterly split and the threshold test are right).
Opens soon
This objective is verified and ready. It opens soon, once sign-in and payments are live.
Deliverable interface
The exact vocabulary the automated check enforces: keys, tokens, entry points, and worked examples. Generated from the verification source.
{
"constants": {},
"entryName": "compute_se_tax_quarterly",
"expectNote": "expect is the comparison-space value (your return value goes through normalize first when one is published)",
"hiddenCaseCount": 12,
"hiddenCaseNames": [
"above_ss_wage_base",
"zero_earnings_no_estimate",
"threshold_boundary_1000",
"business_loss_negative",
"different_tax_year_params",
"exactly_at_wage_base",
"exactly_at_surtax_threshold",
"just_above_surtax_threshold",
"expected_just_below_threshold",
"very_high_earner",
"small_positive_earnings",
"custom_rates_year"
],
"inputKeys": [
"estimated_tax_threshold",
"expected_annual_tax",
"medicare_rate",
"net_se_earnings",
"ss_rate",
"ss_wage_base",
"surtax_rate",
"surtax_threshold"
],
"normalizeSource": "def _normalize_compute_se_tax_quarterly(r):\n if not isinstance(r, dict):\n return repr(r)\n try:\n return {\n \"ss_tax\": round(float(r[\"ss_tax\"]), 2),\n \"medicare_tax\": round(float(r[\"medicare_tax\"]), 2),\n \"surtax\": round(float(r[\"surtax\"]), 2),\n \"se_tax\": round(float(r[\"se_tax\"]), 2),\n \"estimated_payment_required\": bool(r[\"estimated_payment_required\"]),\n \"quarterly_payment\": round(float(r[\"quarterly_payment\"]), 2),\n }\n except Exception:\n return repr(r)\n",
"returnShapes": [
[
"estimated_payment_required",
"medicare_tax",
"quarterly_payment",
"se_tax",
"ss_tax",
"surtax"
]
],
"signature": "def compute_se_tax_quarterly(inp):",
"submission": "python exposing the entry function; inp is one input object; graded on held-out cases",
"tier": "calculator",
"visibleCases": [
{
"expect": {
"estimated_payment_required": true,
"medicare_tax": 2142.52,
"quarterly_payment": 5000,
"se_tax": 11303.64,
"ss_tax": 9161.12,
"surtax": 0
},
"input": {
"expected_annual_tax": 20000,
"net_se_earnings": 80000
},
"name": "typical_below_caps"
},
{
"expect": {
"estimated_payment_required": true,
"medicare_tax": 6695.38,
"quarterly_payment": 20000,
"se_tax": 24048.06,
"ss_tax": 17074.8,
"surtax": 277.88
},
"input": {
"expected_annual_tax": 80000,
"net_se_earnings": 250000
},
"name": "high_earner_surtax"
}
],
"vocabulary": [
"estimated_payment_required",
"estimated_tax_threshold",
"expected_annual_tax",
"medicare_rate",
"medicare_tax",
"net_se_earnings",
"quarterly_payment",
"se_tax",
"ss_rate",
"ss_tax",
"ss_wage_base",
"surtax",
"surtax_rate",
"surtax_threshold"
]
}Get early access to STUD the day it goes live.