Quarterly Tax Estimator
A Python script that turns a simple income config into a quarterly IRS payment schedule — built for anyone earning 1099/freelance income alongside a W-2 job.
2026 Quarterly Estimated Tax Estimator
A Python script that turns a simple income config into a quarterly IRS payment schedule — built for anyone earning 1099/freelance income alongside a W-2 job.
Date: 2026-07-21 Type: Utility Theme: Taxes Status: Idea
What it is
A zero-dependency Python script (script.py) that reads a small JSON config describing your income — W-2 wages, freelance earnings, business expenses, and last year's tax bill — and prints a step-by-step federal tax estimate plus a per-quarter payment schedule for all four 2026 deadlines. It computes self-employment tax (Schedule SE), applies 2026 income tax brackets from the Tax Foundation, and shows both safe-harbor options (90% current-year vs. 100% prior-year) side by side so you can pick the one that fits your cash flow.
Who it serves
Anyone with mixed income — a salaried employee with a side consulting practice, a freelance designer or developer, a gig-platform worker receiving 1099-NEC forms — who has never calculated their quarterly tax obligation and wants a clear, number-by-number answer in under a minute.
The money problem it addresses
Most W-2 employees have taxes withheld automatically and never think about estimated payments. Add any meaningful freelance income and you suddenly owe self-employment tax (15.3% on 92.35% of net earnings) plus income tax on top of that — none of it withheld. The IRS expects quarterly estimated payments on April 15, June 16, September 15, and January 15; miss them and you pay 6–7% compounded-daily interest on the shortfall. The most common outcome: a painful surprise on April 15 when a filer discovers they owe $3,000–5,000 they never budgeted for, plus a penalty they could have avoided entirely. This script makes the obligation visible and actionable before it's too late.
How it works
- Reads a JSON config with your income fields (W-2 wages, withholding, freelance income, business expenses, other income, prior-year tax).
- Computes SE tax: net self-employment income × 92.35% × 15.3% = self-employment tax; half of that is deducted above-the-line to reach AGI.
- Computes income tax: applies 2026 marginal brackets (Tax Foundation) to taxable income (AGI minus standard deduction).
- Derives net tax due from estimated payments: total federal tax minus W-2 withholding already being collected.
- Builds a schedule: divides the safe-harbor target across all four 2026 quarters, labels each as past / next-up / future relative to today's date.
- Compares safe harbors: Option A (90% of current-year tax, lower cash outlay) vs. Option B (100%/110% of prior-year tax, zero penalty risk) — auto-selects the lower one.
- Prints next steps with IRS Direct Pay and EFTPS links.
What's in this folder
README.md— this filecover-image.png— concept illustration for the web app cardmetadata.md— workflow metadata sidecarrequirements.md— functional requirements and tax computation specscript.py— the runnable Python estimator (stdlib only, no pip needed)sample-config.json— synthetic filer profile (Jordan Chen, single, W-2 + freelance)sample-output.txt— exact terminal output of runningpython3 script.pyagainstsample-config.json
How to run / read it
# Run against the included sample config
python3 script.py --config sample-config.json
# Specify a safe-harbor method explicitly
python3 script.py --config sample-config.json --safe-harbor prior-100
# See all options
python3 script.py --help
To use with your own numbers: copy sample-config.json to my-config.json, fill in your figures, and point --config at it. No pip installs, no external services, no API keys — everything runs locally with Python 3.9+.
Open sample-output.txt to see the exact output produced by the sample config.
Estimated impact
A W-2 + $28,000 freelance filer like the sample (Jordan Chen) owes ~$3,844.67 in estimated federal tax across 2026. The safe-harbor minimum is $720.05 per quarter under the current-year method. Someone who completely ignores all four payments and pays the lump sum in April faces:
- ~$92–130 in IRS underpayment interest (6–7% annualised, compounded daily, on the missed amounts from each deadline — approximately $37 on Q1, $25 on Q2, $17 on Q3, $13 on Q4).
- A $3,844 cash-flow shock in April when they may not have the funds set aside.
The script surfaces the obligation in real time so the filer can set aside ~$240/month throughout the year and pay $720.05 on each deadline instead — avoiding both the penalty and the surprise.
Good to know
This is an educational estimator covering federal income tax and self-employment tax only — it does not include state income taxes, FICA differences for S-corp owners, the Additional Medicare Tax (0.9% over $200,000 AGI for single filers), or the Net Investment Income Tax. Rates and contribution limits are based on Tax Foundation and IRS sources current as of July 2026. Tax law changes frequently; verify all figures with a CPA or qualified tax professional before making payment decisions. This is not personalized tax, legal, or investment advice.
Sources
https://taxfoundation.org/data/all/federal/2026-tax-brackets/— 2026 federal income tax brackets, standard deductionshttps://www.nerdwallet.com/taxes/learn/estimated-quarterly-taxes— quarterly estimated tax overview, due dates, safe-harbor rules, $1,000 thresholdhttps://www.irs.gov/faqs/estimated-tax— IRS FAQ: who must pay estimated taxhttps://www.irs.gov/faqs/estimated-tax/individuals/individuals-2— IRS: when to pay estimated taxhttps://www.kiplinger.com/taxes/tax-deadline/602538/when-estimated-tax-payments-due— 2026 quarterly due date calendar (confirms June 16 for Q2)https://www.irs.gov/businesses/small-businesses-self-employed/self-employment-tax-social-security-and-medicare-taxes— SE tax rate (15.3%), Schedule SE multiplier (92.35%)https://www.countrytaxcalc.com/tax-guides/usa/quarterly-estimated-tax-guide-2026/— 2026 guide: deadlines, safe-harbor rules, 100%/110% prior-year thresholdhttps://relayfi.com/blog/what-is-the-penalty-for-not-paying-quarterly-taxes/— underpayment penalty rate (6–7% for 2026 quarters)
Requirements
Requirements — 2026 Quarterly Estimated Tax Estimator
Purpose
A standalone Python script that reads a filer's income profile from a JSON config file and outputs:
- A step-by-step federal tax computation (income tax + self-employment tax) using 2026 brackets.
- A quarterly payment schedule for all four 2026 deadlines, each labeled past / next / future relative to the current date.
- A safe-harbor comparison (90% current-year vs. 100%/110% prior-year) with auto-selection of the lower amount.
Runtime Requirements
- Python 3.9+ — stdlib only (
argparse,json,decimal,datetime,pathlib,sys) - No pip installs required — zero external dependencies
- Runs on macOS, Linux, and Windows (any platform with Python 3.9+)
Functional Requirements
Input / CLI
--config <path>— path to a JSON config file; defaults tosample-config.jsonin the working directory--safe-harbor {current-90 | prior-100 | prior-110 | auto}— safe-harbor method selection; defaultauto- Non-zero exit code (
sys.exit(1)) when:- The config file does not exist
filing_statusis not one ofsingle,married_filing_jointly,head_of_household
Config fields (all optional; missing fields default to 0 or "single")
| Field | Type | Description |
|---|---|---|
name |
string | Display name for the filer |
filing_status |
string | single / married_filing_jointly / head_of_household |
w2_wages |
number | Annual W-2 gross wages (pre-tax) |
w2_withholding |
number | Federal income tax withheld from W-2 paychecks |
freelance_income |
number | Gross 1099 / freelance receipts |
business_expenses |
number | Deductible business expenses against freelance income |
other_income |
number | Other taxable income (interest, dividends, etc.) |
prior_year_tax |
number | Total federal tax liability shown on last year's return (Form 1040 line 24) |
prior_year_agi |
number | Prior-year AGI (determines 100% vs. 110% safe harbor) |
extra_deductions_beyond_standard |
number | Additional itemised deductions above the standard deduction (0 if taking standard) |
Tax computation — must follow this order exactly
- Net SE income =
freelance_income−business_expenses - SE taxable base = net SE income × 0.9235 (IRS Schedule SE multiplier)
- SE tax = SE taxable base × 0.153 (15.3% rate); skip if net SE income < $400
- SE deduction = SE tax ÷ 2 (deductible above-the-line, Schedule 1)
- AGI =
w2_wages+ net SE income +other_income− SE deduction - Taxable income = AGI − standard deduction −
extra_deductions_beyond_standard(floor at $0) - Income tax = bracket calculation using 2026 Tax Foundation brackets (see table below)
- Total federal tax = income tax + SE tax
- Net tax due = total federal tax −
w2_withholding(floor at $0)
2026 Federal Tax Brackets (Tax Foundation)
Single filer:
| Up to | Rate |
|---|---|
| $12,400 | 10% |
| $50,400 | 12% |
| $105,700 | 22% |
| $201,775 | 24% |
| $256,225 | 32% |
| $640,600 | 35% |
| Above | 37% |
MFJ thresholds are double; HoH uses IRS-published 2026 values.
Standard deductions (2026): Single $16,100 · MFJ $32,200 · HoH $24,150
Safe-harbor computation
- Option A (current-90): quarterly amount = (total_federal_tax × 0.90 − w2_withholding) ÷ 4
- Option B (prior-100 or prior-110): quarterly amount = (prior_year_tax × multiplier − w2_withholding) ÷ 4
- multiplier = 1.10 if prior_year_agi > $150,000; else 1.00
auto: pick whichever option yields the lower per-quarter amount (floor both at $0)
Money arithmetic
- All money calculations must use
decimal.Decimal— never Pythonfloatfor currency math - Round to cents using
ROUND_HALF_UPat each intermediate step - Dollar amounts display with comma thousands separator and two decimal places
Quarterly schedule
- Use
datetime.date.today()to classify each of the four 2026 quarters:- Q1 due April 15, 2026
- Q2 due June 16, 2026 (June 15 is a Sunday)
- Q3 due September 15, 2026
- Q4 due January 15, 2027
- Status labels:
⚠ PAST(today past due date),▶ NEXT UP(first non-past quarter),○ FUTURE
Output sections (stdout)
- Header (date, config path, filer name/status)
- Income inputs
- SE tax detail
- Federal income tax detail with per-bracket breakdown
- Total federal tax summary and net amount due
- Quarterly payment schedule table
- Safe harbor comparison (both options side by side)
- Past-due reminder (if any quarters are past)
- Next steps (Direct Pay URL, EFTPS URL, IRS Online Account URL)
- Educational disclaimer
Constraints
- No hard-coded secrets, real account numbers, or real API keys
- Config file is read-only; the script never writes or modifies it
- All URLs in output must be real IRS/government URLs, not placeholders
- The disclaimer "Educational estimator only — not personalized tax, legal, or financial advice" must appear in the output