State tax docs / States / Massachusetts
Massachusetts state income tax: engine rules, 2026
How the QuantCalc engine computes Massachusetts tax for tax year 2026, rule by rule, with the official source for each rule. Verification status: Statute and instructions cited (what this means).
On this page: How the tax is computed · Rate schedule · Deductions, exemptions and credits · Age 65+ subtractions and credits · Social Security · IRA, 401(k) and private pensions · Public pensions · Military retirement pay · Roth conversions · Capital gains · Surtaxes and recapture · Worked examples · Not calculated ·
Verification. Machine-readable: this state's entry in the
engine config and the provenance file
(key MA).
How the tax is computed
Every step the engine takes for Massachusetts, in the order it takes them. Steps marked with a filing status or household type apply only there. Each step links the section below that carries Massachusetts's figures and the official sources for it; the calculation order page describes every step for all jurisdictions.
What each filing status gets, read back from the engine for a household with $1 of income (so below every phase-out and income test):
| Single | Married filing jointly | Married filing separately | Head of household | |
|---|---|---|---|---|
| Rate schedule used | single schedule | joint schedule | joint schedule, thresholds halved | single schedule |
| Top rate | 5% flat | 5% flat | 5% flat | 5% flat |
| Standard deduction, under 65 | $4,400 | $8,800 | $4,400 | $6,800 |
| Standard deduction at 70 (joint: both 70) | $4,400 | $8,800 | $4,400 | $6,800 |
| Personal exemption | none | none | none | none |
| Age subtractions at 70 (joint: both 70) | $700 | $1,400 | $700 | $700 |
- Per-person mode joint returns with the spouse's age given On a joint return with the spouse's age given, every age test the state applies per taxpayer is evaluated for each spouse at their own age. Without it one household age applies to both.
engine step (compute_state_tax_detail). Engine convention, no external source: The engine cannot know the second spouse's age unless told. - Rate schedule and standard deduction by filing status Single uses the single schedule and deduction; married filing jointly the joint ones. Head of household and married filing separately follow the two steps below.
Massachusetts's values · engine step (select_brackets). Sources (Rate schedule): Tax rates (Massachusetts DOR) (checked 2026-09-27); Tax treatment of government pensions (checked 2026-09-27) - Married filing separately Where the state publishes its own separate schedule, that one (with half the joint deduction unless a separate deduction is set). Where one schedule applies to every status, that schedule unscaled with the single deduction. Otherwise the joint schedule with every threshold and the deduction halved (computed as the joint tax on twice the income, halved).
Massachusetts's values · engine step (select_brackets). Sources (Rate schedule): Tax rates (Massachusetts DOR) (checked 2026-09-27); Tax treatment of government pensions (checked 2026-09-27) - Head of household The state's head-of-household schedule where it has one, else the single schedule; the head-of-household deduction where set, else the single deduction.
Massachusetts's values · engine step (select_brackets). Sources (Rate schedule): Tax rates (Massachusetts DOR) (checked 2026-09-27); Tax treatment of government pensions (checked 2026-09-27) - The income total every income test uses Other ordinary income + retirement distributions (before any exclusion) + conversion + federally taxable Social Security + long-term gains. It stands in for federal adjusted gross income in every threshold, cliff and phase-out below; state subtractions do not reduce it.
engine step (compute_state_tax_detail). Engine convention, no external source: The inputs are the federal AGI components, so their sum is federal AGI for these income types. - Attributing income to each spouse joint returns with each spouse's own amounts given With a caller's split (the API's
spouseobject), each spouse's own distributions, pension, public pension, conversion, wages and military pay; spouse 2's shares are clamped into the household totals and spouse 1 gets the rest. Without a split, in per-person mode, every item is divided 50/50. Social Security, other ordinary income and gains are always divided 50/50 where a rule needs a per-person amount. The split is used only where a state's rule is per taxpayer; household totals stay authoritative for the base and the income tests.
engine step (compute_state_tax_detail). Engine convention, no external source: Equal attribution is the neutral split when the owner of a dollar is not known. - Keeping the per-spouse shares inside the household joint returns with each spouse's own amounts given After the public-pension and employer-pension carve-outs, if the two spouses' remaining shares add up to more than the household's exclusion-eligible distributions (an inconsistent split), spouse 1's share is reduced so they do not.
engine step (compute_state_tax_detail). Engine convention, no external source: Input normalisation. - Military retirement pay The state's military rule runs first, on military pay alone, per taxpayer: each spouse's own pay at their own age when attributed, otherwise half each at the household age on a joint return. Exempt dollars leave the base; the rest become pension dollars for the general retirement rules.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Military retirement pay): Tax treatment of government pensions in massachusetts (checked 2026-09-27) - One taxpayer's military exemption Exempt: all of it (below the age split, up to the younger cap). Capped: up to the cap for the age tier, plus the earned-income bonus below the age split when the taxpayer's own wages exceed the threshold, less the taxpayer's own Social Security where the rule says so. Percentage: the percentage (below the age split, up to the younger cap). Then the income limit: above it the exemption is lost, or phased out over the range where one is set.
Massachusetts's values · engine step (military_exempt_one). Sources (Military retirement pay): Tax treatment of government pensions in massachusetts (checked 2026-09-27) - Public pension exemption Public-pension dollars leave the base, uncapped or up to the per-taxpayer cap (each spouse's own public pension against their own cap when attributed), without using up the general exclusion the remaining distributions may claim. Capped-out public dollars stay taxable and cannot draw the private exclusion.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Public pensions): Tax treatment of government pensions (Massachusetts DOR) (checked 2026-09-27); Differences Between MA and Federal Tax Law for Personal Income (checked 2026-09-27) - Social Security exempt None of the federally taxable benefit enters the base.
Massachusetts's values · engine step (ss_amount_in_state_base). Sources (Social Security): Massachusetts tax information for seniors and retirees (checked 2026-09-27); Differences Between MA and Federal Tax Law for Personal Income (checked 2026-09-27) - Retirement exclusion (household) The distributions eligible for the exclusion go through the exclusion below. Taxable public-pension dollars left by a cap are not eligible; below the IRA age only employer-plan dollars are.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (IRA, 401(k) and private pensions): Massachusetts tax information for seniors and retirees (checked 2026-09-27); Differences Between MA and Federal Tax Law for Personal Income (checked 2026-09-27) - Conversion taxed or exempt In full-exclusion states a conversion is exempt at the qualifying age (at any age where the state says so). Elsewhere, unless pooled above, it is ordinary income taxed in full.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Roth conversions): Tax treatment of non-government pensions and retirement plans (Massachusetts DOR) (checked 2026-09-27) - Long-term gains in the base Where gains are taxed as ordinary income: net long-term gain less the flat exclusion (never below zero), times the inclusion share. Elsewhere none enters.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Capital gains): Differences Between MA and Federal Tax Law for Personal Income (checked 2026-09-27); Tax rates (Massachusetts DOR) (checked 2026-09-27) - Age subtraction At or above the age: the single amount, or the joint amount on a joint return (both spouses at the household age). In per-person mode, half the joint amount (or the single amount) per qualifying spouse. Plus the low-income amount below the income test; less the military exclusion where the statute says so; limited to the spouse's own income where the statute says so.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Age 65+ subtractions and credits): Personal income tax exemptions (checked 2026-09-27) - State taxable income Other ordinary income + Social Security, retirement income, conversion and gains left in the base − standard deduction − personal exemption − age subtractions.
engine step (compute_state_tax_detail). Engine convention, no external source: The order of subtraction follows the state forms; each amount is sourced at its own step. - No tax at or below zero State taxable income at or below zero returns a tax of 0 (credits are not refundable and nothing below applies).
engine step (compute_state_tax_detail). Engine convention, no external source: Every credit the engine carries is nonrefundable, so nothing below can make a zero tax negative; each credit is sourced at its own step. - Separate-return scaling married filing separately For the halved-joint rule, taxable income is doubled before the schedule and the result halved.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Rate schedule): Tax rates (Massachusetts DOR) (checked 2026-09-27); Tax treatment of government pensions (checked 2026-09-27) - The rate schedule Each bracket's rate on the part of taxable income inside it, summed. No rounding: the result is carried in full precision.
Massachusetts's values · engine step (apply_state_brackets). Sources (Rate schedule): Tax rates (Massachusetts DOR) (checked 2026-09-27); Tax treatment of government pensions (checked 2026-09-27) - Credits cannot make the tax negative The credits are subtracted and the result floored at zero.
engine step (compute_state_tax_detail). Engine convention, no external source: Every credit the engine carries is nonrefundable; each credit is sourced at its own step. - Surtax on high income The rate times state taxable income over the filing status's threshold.
Massachusetts's values · engine step (compute_state_tax_detail). Sources (Surtaxes and recapture): Massachusetts 4% Surtax on Taxable Income (checked 2026-09-27)
Rate schedule
A flat 5% on state taxable income.
- Tax rates (Massachusetts DOR), Massachusetts Department of Revenue. Massachusetts taxes wages, interest, dividends, other income and most long-term capital gains at a flat 5.00%, with a 4% surtax on income over $1,107,750 in tax year 2026; short-term gains are 8.5% and collectibles 12%. Checked 2026-09-27.
- Tax treatment of government pensions, Massachusetts Department of Revenue. Massachusetts Department of Revenue: "Distributions made to you from a Massachusetts state and local employee contributory plan are excluded from Massachusetts gross income even though they are included in federal gross income." (and 1 more quoted passage) Checked 2026-09-27.
Deductions, exemptions and credits
- Standard deduction (or the exemption the engine carries in its place): $4,400 single, $8,800 married filing jointly, $6,800 head of household.
- Personal income tax exemptions (Massachusetts DOR), Massachusetts Department of Revenue. Massachusetts allows a personal exemption of $4,400 (single/MFS), $6,800 (head of household) or $8,800 (married filing jointly), plus $700 per taxpayer age 65 or older. Checked 2026-09-27.
Age 65+ subtractions and credits
- At age 65 or older: $700 is subtracted from the base ($1,400 for a married couple filing jointly when both qualify), against any income. With the spouse's age given, each spouse qualifies on their own age.
- Personal income tax exemptions, Massachusetts Department of Revenue. Massachusetts Department of Revenue: "Single $4,400 Married filing separate $4,400 Head of household $6,800 Married filing joint $8,800" (and 1 more quoted passage) Checked 2026-09-27.
IRA, 401(k) and private pensions
- No exclusion: pension, annuity and IRA/401(k) distributions are taxed as ordinary income.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- Engine taxes traditional IRA distributions in full; Massachusetts excludes the recovery of previously taxed (non-deductible for MA) contributions. The engine has no MA IRA-basis input.
- Massachusetts tax information for seniors and retirees, Massachusetts Department of Revenue. Private pension, annuity, 401(k) and traditional IRA distributions are taxable in Massachusetts at the 5% rate, with no age-based exclusion. Checked 2026-09-27.
- Differences Between MA and Federal Tax Law for Personal Income, Massachusetts Department of Revenue. Traditional IRA contributions are not deductible for Massachusetts, so IRA distributions are taxable only above previously taxed (MA-basis) contributions. Checked 2026-09-27.
Public pensions
Public (government) pension dollars, entered as pensionPublic, are exempt with no dollar cap. They do not use up the capped exclusion that other retirement income may claim.
- Tax treatment of government pensions (Massachusetts DOR), Massachusetts Department of Revenue. Distributions from Massachusetts state/local and federal contributory pensions are excluded from Massachusetts gross income. Checked 2026-09-27.
- Differences Between MA and Federal Tax Law for Personal Income, Massachusetts Department of Revenue. Pensions paid by the Commonwealth and its cities and towns and contributory plans of other states and the federal government are excluded from Massachusetts income. Checked 2026-09-27.
Military retirement pay
- Military retirement pay is fully exempt, at any age.
- Rules are applied per taxpayer at that person's own age when the spouse's age is given. API value:
rules.militaryRetirement.treatment: "exempt".
- Tax treatment of government pensions in massachusetts, Massachusetts Department of Revenue. US military pensions are excluded from Massachusetts gross income. Checked 2026-09-27.
Roth conversions
A conversion is taxed as ordinary income in full. It does not draw any retirement-income exclusion.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- MA previously-taxed-contribution basis is not modeled (engine taxes the full federally taxable conversion).
- Tax treatment of non-government pensions and retirement plans (Massachusetts DOR), Massachusetts Department of Revenue. The taxable part of a traditional-to-Roth conversion included in federal gross income is included in Massachusetts gross income, except for Massachusetts previously taxed contributions. Checked 2026-09-27.
Capital gains
- Net long-term gain is taxed as ordinary income.
- Short-term gains are ordinary income.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- The engine's LTCG input is taxed at 5%; 8.5% short-term and 12% collectibles rates are not modeled.
- Differences Between MA and Federal Tax Law for Personal Income, Massachusetts Department of Revenue. Massachusetts taxes most long-term capital gains at the same 5% rate as ordinary income (collectibles 12% with a 50% deduction; short-term gains 8.5%). Checked 2026-09-27.
- Tax rates (Massachusetts DOR), Massachusetts Department of Revenue. Long-term gains are taxed at 5.00%; short-term gains at 8.5%; collectibles at 12.00%; all subject to the 4% surtax above the threshold. Checked 2026-09-27.
Surtaxes and recapture
- An extra 4% on taxable income over $1,107,750 (the same threshold for every filing status); the threshold is indexed for inflation.
- Massachusetts 4% Surtax on Taxable Income, Massachusetts Department of Revenue. A 4% surtax applies to Massachusetts taxable income above an inflation-indexed threshold of $1,107,750 for tax year 2026. Checked 2026-09-27.
Worked examples
Computed by the engine for the fixed households below (the same ones for every state, so states compare directly). Federal tax is not supplied, so a federal-tax deduction is not taken; the income tests use the sum of the components as income.
| Household (engine inputs) | State tax |
|---|---|
| Single, 67: $30,000 private pension, $20,000 IRA, $10,000 interest, $24,000 Social Security ($17,000 federally taxable), $5,000 long-term gain | $2,995 |
| Married filing jointly, 70: $40,000 public pension, $40,000 IRA, $20,000 interest, $40,000 Social Security ($34,000 federally taxable), $10,000 long-term gain | $2,990 |
| Single, 60: $60,000 other ordinary income and a $50,000 Roth conversion | $5,280 |
| Married filing jointly, 66: $30,000 IRA, a $40,000 Roth conversion, $30,000 Social Security ($25,500 federally taxable) | $2,990 |
| Single, 58: $36,000 military retirement pay and $30,000 wages | $1,280 |
| Married filing jointly, ages 67 and 61: $50,000 IRA, $10,000 interest, $30,000 Social Security ($25,500 federally taxable), each spouse's age given | $2,525 |
Line by line
The intermediate lines the engine records while it computes each example (its detail record, printed as it comes out; lines that are zero are left out). The engine's documentation build checks that the lines add up to the taxable income and the tax, for every state, filing status and a grid of households. Each line links the engine step that produces it.
Single, 67: $30,000 private pension, $20,000 IRA, $10,000 interest, $24,000 Social Security ($17,000 federally taxable), $5,000 long-term gain: $2,995
| Line | Amount |
|---|---|
| Income total used by the income tests | $82,000 |
| + Other ordinary income in the base | $10,000 |
| + Retirement income in the base | $50,000 |
| + Long-term gain in the base | $5,000 |
| − Standard deduction | $4,400 |
| − Age subtractions and deductions | $700 |
| = State taxable income | $59,900 |
| Tax from the rate schedule | $2,995 |
| = Tax before credits | $2,995 |
| = Tax | $2,995 |
Married filing jointly, 70: $40,000 public pension, $40,000 IRA, $20,000 interest, $40,000 Social Security ($34,000 federally taxable), $10,000 long-term gain: $2,990
| Line | Amount |
|---|---|
| Income total used by the income tests | $144,000 |
| Retirement income and conversions excluded (not in the base) | $40,000 |
| + Other ordinary income in the base | $20,000 |
| + Retirement income in the base | $40,000 |
| + Long-term gain in the base | $10,000 |
| − Standard deduction | $8,800 |
| − Age subtractions and deductions | $1,400 |
| = State taxable income | $59,800 |
| Tax from the rate schedule | $2,990 |
| = Tax before credits | $2,990 |
| = Tax | $2,990 |
Single, 60: $60,000 other ordinary income and a $50,000 Roth conversion: $5,280
| Line | Amount |
|---|---|
| Income total used by the income tests | $110,000 |
| + Other ordinary income in the base | $60,000 |
| + Roth conversion in the base | $50,000 |
| − Standard deduction | $4,400 |
| = State taxable income | $105,600 |
| Tax from the rate schedule | $5,280 |
| = Tax before credits | $5,280 |
| = Tax | $5,280 |
Married filing jointly, 66: $30,000 IRA, a $40,000 Roth conversion, $30,000 Social Security ($25,500 federally taxable): $2,990
| Line | Amount |
|---|---|
| Income total used by the income tests | $95,500 |
| + Retirement income in the base | $30,000 |
| + Roth conversion in the base | $40,000 |
| − Standard deduction | $8,800 |
| − Age subtractions and deductions | $1,400 |
| = State taxable income | $59,800 |
| Tax from the rate schedule | $2,990 |
| = Tax before credits | $2,990 |
| = Tax | $2,990 |
Single, 58: $36,000 military retirement pay and $30,000 wages: $1,280
| Line | Amount |
|---|---|
| Income total used by the income tests | $66,000 |
| Military pay excluded (not in the base) | $36,000 |
| + Other ordinary income in the base | $30,000 |
| − Standard deduction | $4,400 |
| = State taxable income | $25,600 |
| Tax from the rate schedule | $1,280 |
| = Tax before credits | $1,280 |
| = Tax | $1,280 |
Married filing jointly, ages 67 and 61: $50,000 IRA, $10,000 interest, $30,000 Social Security ($25,500 federally taxable), each spouse's age given: $2,525
| Line | Amount |
|---|---|
| Income total used by the income tests | $85,500 |
| + Other ordinary income in the base | $10,000 |
| + Retirement income in the base | $50,000 |
| − Standard deduction | $8,800 |
| − Age subtractions and deductions | $700 |
| = State taxable income | $50,500 |
| Tax from the rate schedule | $2,525 |
| = Tax before credits | $2,525 |
| = Tax | $2,525 |
What the engine does not calculate, and known approximations
- MA previously-taxed-contribution basis is not modeled (engine taxes the full federally taxable conversion). (Roth conversions)
- The engine's LTCG input is taxed at 5%; 8.5% short-term and 12% collectibles rates are not modeled. (Capital gains)
What the engine does not calculate for any state (itemized deductions, credits beyond those listed, part-year residents, dependents, blindness and disability, and more) is listed on the calculation order page.
Verification
Statute and instructions cited Flat rate and the 4% surtax cited to the Department of Revenue; unit tests pin them.
- Golden scenarios (hand-computed expected tax, asserted to within $1): none for this state.
- State-specific unit tests:
test_none_state_taxes_pension_like_ordinary,test_ma_hoh_senior_public_pension. - Structural tests covering every state: 3.
Social Security
Social Security benefits are fully exempt: none of the federally taxable amount enters the state base.
API value:
socialSecurityRule: "exempt". The engine's input is the federally taxable amount; income tests use the sum of the income components as the adjusted-gross-income proxy.