calculate_tax
Compute US federal INDIVIDUAL income tax (or balance due if withholding is given) from a content-addressed corpus of cited rules. NEVER estimate tax yourself — call this, and report ONLY numbers returned by oracle calls made with the real facts (never hand-check or approximate a line the oracle can compute: your recalled parameters may be stale). Negative result = refund. Returns the answer, every assumption made, and hashes that let anyone re-verify the full derivation offline. Facts are grouped (filing, income, retirement, credits, …) — fill the groups that apply; unknown keys are rejected, and the engine names any missing fact the target needs. When source documents CONFLICT on a value, do not silently pick one: compute both branches, disclose the conflict and your choice; an interview/confirmation answer (rollover, conversion, taxable-amount screens) usually reflects taxpayer intent better than a payer form's box code — prefer it and disclose. That heuristic covers FACTS only: LEGAL classifications (qualifying child vs other dependent, filing status, SSTB) follow the statute's tests, not intake checkbox labels — a generic 'claim dependent credit' flag does not convert a qualifying child into an ODC dependent. TRANSCRIBE documented amounts as given even when they look anomalous (e.g. state withholding in a no-income-tax state): disclose the anomaly, never delete or 'correct' a documented number from outside knowledge. If you believe an oracle result is wrong, report the ORACLE's number and note your dissent — never substitute your own: the corpus is primary-source-verified and your recollection is not. Business entities → calculate_business_tax; estates/trusts → calculate_fiduciary_tax; § 152 dependency → determine_dependent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | REQUIRED for computation: the law-in-force date — use the intended tax year's year-end (e.g. "2025-12-31" for TY2025). Omitting it is an error, never a default. | |
| state | No | state taxable income for the state tax targets (us.ca/us.va/us.il/us.ny/us.oh/us.nc/us.ga/us.md/us.mo/us.wi/us.mn income_tax; parameters via lookup_tax_parameter) | |
| filing | No | who is filing: status, age/blindness, dependency, student status | |
| income | No | wages, interest, capital gains, unemployment, foreign earned income | |
| target | No | rule to derive (default: net tax; balance due when payments_estimates.federalTaxWithheld is given). Determinations: us.federal.eligible.tips_deduction, us.federal.estimated.quarterly_payment, us.federal.estimated.safe_harbor_met | |
| credits | No | CTC/ODC counts, dependent care, saver's, adoption, education | |
| itemized | No | Schedule A: SALT, mortgage, medical, charitable | |
| documents | No | RAW document transcription (preferred over hand-mapped facts): W-2 boxes, 1099-R boxes/codes, SSA-1099 boxes, dependents' birth dates. SSA-1099s are first-class: box 5 sums into socialSecurityBenefits and box 6 into withholding, so the § 86 taxable-benefits worksheet runs on the transcribed total instead of a hand-mapped guess. The tool derives wages/withholding (incl. Form 8959 Part IV), box-3/5 wage coordination, dependent classifications, age facts, and early-distribution penalties deterministically — and errors if the same value is also passed as a hand-mapped fact. | |
| kiddie_tax | No | Form 8615 inputs for a child subject to § 1(g) | |
| retirement | No | social security, IRA/pension distributions, early-distribution penalty | |
| adjustments | No | IRA/HSA contributions, student-loan and car-loan interest | |
| investor_amt | No | AMT preferences (ISO spread) and § 1202 QSBS exclusion | |
| tips_overtime | No | § 224 tips and § 225 overtime deductions (OBBBA) | |
| healthcare_ptc | No | § 36B premium tax credit / Form 1095-A reconciliation | |
| rentals_passive | No | Schedule E rentals/royalties + § 469 passive-loss netting (Form 8582 via us.federal.passive_loss_allowed) | |
| self_employment | No | Schedule C / K-1, QBI inputs, SE deductions, home office | |
| household_employer | No | Schedule H nanny/household-employee taxes | |
| payments_estimates | No | withholding, prior-year safe harbor, annualized installments |