Skip to content
Calculators
Reviews

Capital Gains Tax Calculator: What You’ll Really Owe the IRS

April 30, 2026by cyborg.vaibhav@gmail.com8 min read

Naomi did everything the personal-finance articles told her to do. She waited past the one-year mark before selling her vested RSU shares, checked the calendar twice, and sold at day 380 specifically to lock in the long-term rate. Her broker’s 1099 the following February showed a tax bill roughly a fifth higher than the 15% she’d planned around. Nobody had ever mentioned there was a second tax sitting on top of the long-term rate — one that isn’t in any bracket chart, hasn’t moved a single dollar since 2013, and had quietly caught her the moment her ordinary salary growth, not her investment gain, pushed her past a line Congress has never once adjusted for inflation.

Naomi, 41, software engineer, Seattle, Washington No state income tax. Sold vested RSU shares after waiting past one year. FORM 1099-B Tax: ~18.8% expected: 15%

Naomi is a composite character — a stand-in for a pattern that shows up constantly among dual-income professional households, not a real brokerage statement. Her numbers are invented. The extra layer of tax that caught her is not.

How this article was checked. The Net Investment Income Tax mechanics and thresholds below are described directly from the IRS’s own published guidance as reviewed in July 2026. The $200,000/$250,000 thresholds are fixed by statute rather than adjusted annually, which is itself the point of this article — still, always confirm current details against irs.gov before relying on a specific figure.

What every capital gains explainer tells you

Sell an investment held one year or less, and the gain is taxed as ordinary income at your regular bracket. Hold it more than a year — not exactly a year, more than a year, so day 366 at the earliest — and it qualifies for the long-term rate instead: 0%, 15% or 20% depending on your total taxable income. That’s the whole story in almost every article on the subject, and as far as it goes, it’s correct.

The chart everyone shows you 0% bracket 15% bracket 20% bracket This is the entire chart in almost every article you’ll find on the topic. It is missing a layer.

The layer that never makes the chart

Since 2013, a separate tax called the Net Investment Income Tax applies a flat 3.8% on top of whatever capital gains rate you already owe — but only once your modified adjusted gross income crosses $200,000 for a single filer or $250,000 married filing jointly. It applies to the lesser of your net investment income or the amount your MAGI exceeds that threshold, and it stacks directly on top of the long-term rate you already calculated. A gain taxed at 15% under the standard chart can effectively become 18.8% once NIIT applies — and the 20% bracket becomes 23.8%.

Naomi’s actual arithmetic

Naomi’s salary alone has grown from ordinary annual raises over nine years — nothing dramatic, just cost-of-living adjustments and a couple of promotions. This year, for the first time, her salary plus her RSU gain pushed her modified AGI just over $200,000. The $200,000 threshold has not moved by a single dollar since the tax was created in 2013. Her employer’s pay has kept pace with inflation; the threshold has not moved at all. She crossed the line not because her investment gain was unusually large, but because ordinary wage growth over nearly a decade did what wage growth against a fixed threshold always eventually does.

Same gain, three years apart, one threshold that never moved THREE YEARS AGO Salary + gain: $188,000 Below the $200,000 line No NIIT owed THIS YEAR Salary + gain: $214,000 $200,000 line: unchanged since 2013 3.8% owed on the excess

Why this is a stealth tax increase, not a new tax

Nearly every dollar figure in the federal tax code — bracket thresholds, the standard deduction, retirement contribution limits — is adjusted every year for inflation. The NIIT threshold is a deliberate exception: Congress wrote a fixed dollar amount into the statute in 2013 and has never updated it. Every year that wages and asset values grow, a wider slice of households cross a line that, in real purchasing-power terms, keeps shrinking. Nobody voted to expand the NIIT; ordinary growth against a frozen number did it automatically.

Run it on your own numbers YOU ENTER Purchase price, sale price Holding period Total income including the gain IT TELLS YOU Your long-term or short-term rate Check separately, every time: does salary + gain cross $200k single / $250k joint? If yes, add 3.8% on the excess.

What to actually do before selling a large gain

Before selling, add your expected gain to your other income for the year and compare the total against $200,000 single or $250,000 married filing jointly — not just your salary alone. If a sale would push you just over the line, consider whether splitting it across two calendar years keeps each year’s MAGI below the threshold, since NIIT is calculated year by year, not on a running lifetime total. And remember that the threshold check has to happen every year going forward, even if nothing about your own finances feels like it changed, because the line itself is what’s effectively moving relative to your income, not the other way around.

A fixed line, rising incomes 2013 today the $200,000 / $250,000 threshold, unchanged since 2013 typical dual-income household earnings, growing every year

Why a large one-time sale is the classic trigger

NIIT rarely surprises someone whose income is steady from year to year, because a household that’s been above or below the threshold for years already knows where it stands. The trap catches people at the exact moment their income is at its most unusual: the year they sell a business, exercise a large batch of stock options, sell a rental property, or take a big RSU vest all at once. Those are precisely the years a household’s total income jumps well outside its normal pattern, which is also exactly when nobody thinks to re-check a threshold that hasn’t changed in over a decade — it never occurred to them to check it before, because it never applied before.

What this does not mean

This is not a reason to avoid selling appreciated investments, and NIIT does not apply to gains inside retirement accounts, which follow their own withdrawal tax rules entirely. It’s also not evidence of an error in the tax code — Congress wrote a fixed threshold deliberately, and whether that was intended to broaden over time or simply never revisited is a policy question, not a technical one. The point is narrower: a fixed-dollar threshold in a tax code where almost everything else is inflation-indexed will catch more people every year purely through nominal income growth, and checking your own total MAGI against it before a large sale costs nothing and avoids a February surprise.

Frequently asked questions

Is the Net Investment Income Tax the same as capital gains tax?

No. It’s a separate 3.8% surtax that applies in addition to whatever capital gains rate — short-term or long-term — you already owe, once your MAGI crosses the threshold. Both amounts appear on the same return but come from different calculations.

Does NIIT apply to my salary?

No — NIIT applies only to net investment income (interest, dividends, capital gains, rental and passive income, among other categories), not to wages or self-employment income directly, though your total income including wages is what determines whether you cross the MAGI threshold in the first place.

Will the $200,000/$250,000 thresholds ever be adjusted for inflation?

Not automatically — unlike ordinary tax brackets, these thresholds are fixed by the statute that created NIIT in 2013 and would require new legislation to change. Check current IRS guidance in case that changes, but assume they stay fixed unless you see it reported otherwise.

Do I owe tax on a gain I haven’t sold yet?

No — capital gains tax and NIIT both apply only when a position is actually sold and the gain is realized, not on paper gains from a position still being held.

Statutory sources, all official: IRS, Net Investment Income Tax; IRS Topic no. 559, Net Investment Income Tax. The framing of the fixed threshold as a “stealth” widening of the tax’s reach over time is Linqz’s own analysis, not stated as such by the IRS.


Disclaimer: General information, not tax or financial advice, and Linqz is not a CPA firm or a registered investment adviser. “Naomi” is a composite character with invented finances, not a real person. Capital gains rates and NIIT thresholds are set by federal law and reviewed periodically — verify current-year figures on irs.gov before acting, and consult a qualified tax professional about your own sale.

Further reading

6 related articles

Leave a Reply