How Capital Gains Tax Is Calculated
Capital gains tax is charged on profit, not on proceeds. The starting point is always the same
subtraction: what you sold it for, minus what the tax code says it cost you.
- Cost basis. What you paid, plus capital improvements and certain acquisition costs. For
property you have depreciated, basis also falls by every dollar of depreciation taken.
- Gain. Sale price minus selling costs, minus adjusted basis.
- Holding period. Held more than one year, the gain is long-term and taxed federally at
0%, 15% or 20%, set by taxable income and filing status. Held one year or less, it is
short-term and taxed as ordinary income at your marginal rate, which is usually much worse.
- Net Investment Income Tax. A further 3.8% applies to investment income once modified
adjusted gross income passes $200,000 single or $250,000 married filing jointly.
- State tax. Applied last, on top of everything above. This is where the arithmetic stops being
national and starts depending entirely on where you live.
Every figure this tool produces is an estimate for educational purposes. Confirm your own numbers
with your CPA before you sign anything.
Capital Gains Tax by State in 2026
State tax is the single largest variable most people can still influence, and the spread is enormous.
The same one million dollar gain carries no state tax at all in seven states and over
$133,000 in California.
The rates below are top marginal rates and are the same figures this calculator applies. Several
states tax capital gains as ordinary income, so a smaller gain may face a materially lower rate than
the table shows. Treat these as the ceiling, not the certainty.
| State | Top marginal rate on capital gains |
|---|
| Alabama | 5.0% |
| Alaska | — |
| Arizona | 2.5% |
| Arkansas | 4.4% |
| California | 13.3% |
| Colorado | 4.4% |
| Connecticut | 6.99% |
| Delaware | 6.6% |
| Florida | — |
| Georgia | 5.49% |
| Hawaii | 11.0% |
| Idaho | 5.8% |
| Illinois | 4.95% |
| Indiana | 3.05% |
| Iowa | 5.7% |
| Kansas | 5.7% |
| Kentucky | 4.0% |
| Louisiana | 4.25% |
| Maine | 7.15% |
| Maryland | 5.75% |
| Massachusetts | 9.0% |
| Michigan | 4.25% |
| Minnesota | 9.85% |
| Mississippi | 5.0% |
| Missouri | 4.8% |
| Montana | 6.75% |
| Nebraska | 5.84% |
| Nevada | — |
| New Hampshire | 5.0% |
| New Jersey | 10.75% |
| New Mexico | 5.9% |
| New York | 10.9% |
| North Carolina | 4.5% |
| North Dakota | 2.5% |
| Ohio | 3.5% |
| Oklahoma | 4.75% |
| Oregon | 9.9% |
| Pennsylvania | 3.07% |
| Rhode Island | 5.99% |
| South Carolina | 6.4% |
| South Dakota | — |
| Tennessee | — |
| Texas | — |
| Utah | 4.65% |
| Vermont | 8.75% |
| Virginia | 5.75% |
| Washington | 7.0% |
| West Virginia | 5.12% |
| Wisconsin | 7.65% |
| Wyoming | — |
The Seven States With No Capital Gains Tax
Alaska, Florida, Nevada, South Dakota, Tennessee, Texas and Wyoming levy no state tax on capital gains.
For a Texas resident this is not a small footnote. On a one million dollar long-term gain, a
California resident in the top bracket faces roughly $133,000 of state tax that a Texan simply does
not owe — before a single federal dollar is counted. It is the reason state of residence at the time
of sale is worth confirming before a closing date is set, particularly for anyone who has moved
recently or splits time between states.
Residency for tax purposes is a question of fact, not preference, and states with high rates
scrutinise departures closely. Speak to your CPA before assuming a move changes the answer.
The Highest Capital Gains Tax States
| State | Top marginal rate |
|---|
| California | 13.3% |
| Hawaii | 11.0% |
| New York | 10.9% |
| New Jersey | 10.75% |
| Oregon | 9.9% |
| Minnesota | 9.85% |
| Massachusetts | 9.0% |
In these states the combined federal, NIIT and state burden on a long-term gain can exceed 37%.
That is the arithmetic that makes deferral strategies worth understanding rather than dismissing.
Long-Term Versus Short-Term: Why One Year Matters
The federal difference between a long-term and a short-term gain is not a rounding error. A
long-term gain tops out at 20%. A short-term gain is ordinary income and can reach 37% federally,
before NIIT and before state tax.
On a $500,000 gain, crossing the one-year holding period can be worth well over $80,000 in federal
tax alone. If a sale is being negotiated near that anniversary, the closing date is a tax decision
as much as a commercial one.
The Net Investment Income Tax
The 3.8% NIIT is the most commonly missed line in a capital gains estimate. It is a separate federal
surtax, it applies on top of the 0/15/20 rates rather than replacing them, and the thresholds
— $200,000 single, $250,000 married filing jointly — are not indexed to inflation, so it reaches
further every year.
A large one-off gain frequently pushes an otherwise ordinary earner over the line for a single tax
year. This calculator applies it automatically when your entered figures cross the threshold.
What Changes the Outcome
- 1031 exchange. For investment real estate, a properly completed
like-kind exchange can defer the entire gain, including depreciation recapture, into the
replacement property’s basis. Deferred, not forgiven.
- Depreciation recapture. If you have depreciated
the asset, part of the gain is taxed at up to 25% rather than the long-term rate, which this
calculator’s general estimate does not separate out.
- Opportunity Zone funds. Reinvesting eligible gain into a qualified fund within 180 days can
defer it, with additional treatment for the new investment if held long enough.
- Installment sale. Spreading proceeds over several tax years can keep a gain out of the top
bracket and below the NIIT threshold in any single year.
- Loss harvesting. Realised capital losses offset realised gains dollar for dollar, and the
timing of both is within your control.
- Step-up in basis. Assets passing to heirs may reset to fair market value at death, which can
eliminate built-in gain entirely for them.
These are categories, not recommendations. Which of them applies — if any — depends on the asset,
the holding period, your state and your wider tax position.