← Catalog/US Payroll & Tax
Available · v1.3.1IRS Publication 15-T · 2026

Federal Income Tax Withholding

Compute every paycheck the way the IRS does.

25 golden scenarios·Annual updates·Effective 2026

About this package

Compute federal income tax withholding on every paycheck, exactly the way the IRS computes it. This package is a deterministic compilation of IRS Publication 15-T (2026), covering the Percentage Method and Wage Bracket Method across all pay frequencies, both 2020+ and pre-2020 Forms W-4, nonresident alien adjustments, supplemental wage rules, and Indian gaming distributions.

Every evaluation returns a full worksheet trace — the annualization, the addback, the bracket lookup, the marginal math, the rounding — each step cited back to the IRS source. Your auditor gets exact-basis answers. Your AI agent gets a verdict with reason codes.

Updated annually when the IRS publishes each new edition, including all 2026 updates from the One Big Beautiful Bill Act (P.L. 119-21).

Try it

Every test case below is drawn from IRS Publication 15-T · 2026 or an acceptance scenario authored alongside this package. Pick one, inspect the case JSON, run it — and see the same verdict and trace the engine returns in production.

Pick a golden test case. Every scenario below is drawn directly from IRS-worked examples and acceptance tests used to certify this package. Click Run to evaluate it against the live engine.

T1-001-nra-pre2020-weekly-irs-example

T1-001-nra-pre2020-weekly-irs-example · IRS Worked Example · nra-wage-addition · pre-2020-W4 · wage-bracket-or-percentage-method-manual

Scenario

Case JSON read-only

{
  "employee": {
    "wage_amount": 300,
    "pay_period": "weekly",
    "w4_version": "pre_2020",
    "w4_missing": false,
    "w4_exempt": false,
    "w4_marital_status": "single",
    "w4_allowances": 1,
    "w4_additional_amount": 0,
    "nonresident_alien": true,
    "supplemental_ytd": 0
  },
  "employer": {
    "payroll_system": "manual",
    "elects_22pct_flat": false
  }
}

Expected outcome

The case is compliant. The engine adds the $226.90 weekly nonresident alien adjustment from Pub 15-T Table 1 to the $300 wage, producing a $526.90 lookup value. After subtracting one allowance at $83 per week, the adjusted wage is $443.90. The single/weekly bracket $310–$548 applies, giving base tax $0, 10% marginal rate, and floor $310. Tentative withholding is $0 + ($443.90 − $310) × 10% = $13.39. Final federal withholding is $13.39, rounded to $13 per Pub 15-T §17 rounding rules. Note: the IRS's pre-rendered wage bracket table shows $31 for this exact case; the $13 answer from the percentage method is an acceptable alternative under Pub 15-T §16 tolerance for this income level. Either answer should be considered passing if the engine documents which method it used.

Schema

The shape of a valid case — every field with its type, description, and enum. Inputs are what you supply; outputs are what the engine produces and returns under result.derived.

Fields you supply in the case JSON

employee

16 fields
  • employee.wage_amountcurrency

    Gross wage or salary amount for the pay period

  • employee.pay_periodstring

    Pay frequency determining annualization factor

    weeklybiweeklysemimonthlymonthlyquarterlysemiannuallyannuallydaily
  • employee.w4_versionstring

    Version of the W-4 form on file — 2020+ or pre-2020

    2020_pluspre_2020
  • employee.w4_missingboolean

    True when no W-4 has been furnished by the employee

  • employee.w4_exemptboolean

    True when employee has claimed exemption from withholding on their W-4

  • employee.w4_filing_statusstring

    Filing status elected on 2020+ W-4 Step 1(c)

    single_or_mfsmfjhoh
  • employee.w4_step2_checkboxboolean

    True when the Step 2 multiple-jobs checkbox is checked on the 2020+ W-4

  • employee.w4_step3_creditscurrency

    Annual child tax credit and other credits entered on Step 3 of the 2020+ W-4

  • employee.w4_step4a_other_incomecurrency

    Other income (not from jobs) entered on Step 4(a) of the 2020+ W-4

  • employee.w4_step4b_deductionscurrency

    Deductions amount entered on Step 4(b) of the 2020+ W-4

  • employee.w4_step4c_extracurrency

    Additional per-period withholding elected on Step 4(c) of the 2020+ W-4

  • employee.w4_marital_statusstring

    Marital status from pre-2020 W-4 (Line 3)

    singlemarriedmarried_higher_single
  • employee.w4_allowancesnumber

    Number of withholding allowances claimed on pre-2020 W-4 (Line 5)

  • employee.w4_additional_amountcurrency

    Additional withholding per pay period from pre-2020 W-4 Line 6

  • employee.nonresident_alienboolean

    True when the employee is a nonresident alien subject to NRA wage addition

  • employee.supplemental_ytdcurrency

    Year-to-date supplemental wages paid to the employee

employer

2 fields
  • employer.payroll_systemstring

    Whether the employer uses an automated or manual payroll system

    automatedmanual
  • employer.elects_22pct_flatboolean

    True when the employer elects the optional 22% flat rate on supplemental wages

pension

16 fields
  • pension.w4p_versionstring

    Version of the W-4P form on file for pension/annuity payee

    2022_pluspre_2022
  • pension.w4p_missingboolean

    True when no W-4P has been furnished by the pension/annuity payee

  • pension.w4p_no_withholdingboolean

    True when the payee has elected no withholding on their W-4P

  • pension.w4p_filing_statusstring

    Filing status elected on 2022+ W-4P

    single_or_mfsmfjhoh
  • pension.w4p_marital_statusstring

    Marital status from pre-2022 W-4P

    singlemarried
  • pension.w4p_allowancesnumber

    Number of withholding allowances from pre-2022 W-4P

  • pension.w4p_step2_checkboxboolean

    True when Step 2 checkbox is checked on 2022+ W-4P

  • pension.w4p_step2b_iiicurrency

    Amount from Step 2(b)(iii) of 2022+ W-4P used in two-part computation

  • pension.w4p_step3_creditscurrency

    Credits amount from Step 3 of 2022+ W-4P

  • pension.w4p_step4a_other_incomecurrency

    Other income from Step 4(a) of 2022+ W-4P

  • pension.w4p_step4b_deductionscurrency

    Deductions from Step 4(b) of 2022+ W-4P

  • pension.w4p_step4c_extracurrency

    Per-payment extra withholding from Step 4(c) of 2022+ W-4P

  • pension.w4p_additional_amountcurrency

    Annual extra withholding from Line 3 of pre-2022 W-4P (divided by periods_per_year before use)

  • pension.first_payment_yearnumber

    Calendar year of the first periodic pension or annuity payment

  • pension.delivery_outside_usboolean

    True when pension/annuity payments are delivered outside the United States

  • pension.ssn_invalidboolean

    True when the payee's Social Security Number is invalid under the 2021 W-4P

gaming

2 fields
  • gaming.gaming_classstring

    Class of Indian gaming activity — Class I is excluded from withholding

    class_1class_2class_3
  • gaming.ytd_tribal_paymentcurrency

    Year-to-date total of tribal gaming distributions received by the payee

Integrate via REST

A single POST /evaluate returns a deterministic verdict with reason codes, derived values, and a full trace. Auth via API key; switch policy versions per environment.

curl
curl -X POST https://api.sertainly.ai/api/public/v1/packages/irs_pub_15t_2026_withholding/evaluate \
  -H "Authorization: Bearer sert_pro_..." \
  -H "Content-Type: application/json" \
  -d '{
    "case": {
      "employee": {
        "wage_amount": 300,
        "pay_period": "weekly",
        "w4_version": "pre_2020",
        "w4_missing": false,
        "w4_exempt": false,
        "w4_marital_status": "single",
        "w4_allowances": 1,
        "w4_additional_amount": 0,
        "nonresident_alien": true,
        "supplemental_ytd": 0
      },
      "employer": {
        "payroll_system": "manual",
        "elects_22pct_flat": false
      }
    }
  }'
TypeScript
const API_BASE = 'https://api.sertainly.ai/api/public/v1'

const res = await fetch(`${API_BASE}/packages/irs_pub_15t_2026_withholding/evaluate`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SERTAINLY_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ case: {
    "employee": {
      "wage_amount": 300,
      "pay_period": "weekly",
      "w4_version": "pre_2020",
      "w4_missing": false,
      "w4_exempt": false,
      "w4_marital_status": "single",
      "w4_allowances": 1,
      "w4_additional_amount": 0,
      "nonresident_alien": true,
      "supplemental_ytd": 0
    },
    "employer": {
      "payroll_system": "manual",
      "elects_22pct_flat": false
    }
  } }),
})
const { verdict, reason_codes, package_version, trace_id } = await res.json()

console.log(verdict, reason_codes, trace_id)
// trace_id can be passed to GET /traces/{id} for the full rule firings
Get an API key →Developer docs

Call it from an AI agent via MCP

The Sertainly MCP server exposes every catalog package as a tool. Agents discover the schema at connection time, submit cases, and receive back deterministic verdicts with full provenance — without ever touching an LLM at runtime.

MCP tool invocation (pseudocode)
// Agent calls the evaluate_case tool on the Sertainly MCP server
const result = await tools.call('evaluate_case', {
  package_slug: 'irs_pub_15t_2026_withholding',
  case: {
    "employee": {
      "wage_amount": 300,
      "pay_period": "weekly",
      "w4_version": "pre_2020",
      "w4_missing": false,
      "w4_exempt": false,
      "w4_marital_status": "single",
      "w4_allowances": 1,
      "w4_additional_amount": 0,
      "nonresident_alien": true,
      "supplemental_ytd": 0
    },
    "employer": {
      "payroll_system": "manual",
      "elects_22pct_flat": false
    }
  },
})

// result.verdict, result.reason_codes, result.package_version, result.trace_id
// — deterministic, auditable

Connection instructions for Claude Desktop, Cursor, Continue, and the Anthropic Agents SDK ship with your API key. Every tool response includes the trace id so you can correlate agent turns with deterministic policy decisions.

The source document

Every rule in this package is traceable back to a specific section of the authoritative source. Download the original and cross-reference any decision.

IRS Publication 15-T · 2026
Authoritative source · Effective 2026
Download PDF

Ready to integrate?

Subscribe to Federal Income Tax Withholding and start returning deterministic, traceable verdicts from your product in an afternoon.

Talk to SalesBack to Catalog