Big Sale TaxHans Goldstein: Tax & Exit Planning
Home / Capital Gains / Capital gains tax calculator
Capital gains tax calculator

Capital Gains Tax Calculator (2027): Sale of Property or a Business

Short answerPrice minus selling costs minus adjusted basis is your gain. Split that gain into Section 1245 recapture (ordinary rates), unrecaptured Section 1250 gain (25% cap, IRC 1(h)) and the rest at 0/15/20% (Rev. Proc. 2026-35, 2027), then add the 3.8% NIIT and your state. Our Arizona rental example: $964,000 of gain, $244,879 of tax.

Request the analysis Book a free scope call

How Tax Brackets Really Work: 0%, 15%, 20% (Plain English)

Capital gains tax calculator (2027)

Start from the sale price

The gain, by tax bucket (filled in from the numbers above; edit to override)
Federal on the sale$192,832
NIIT$33,972
State$18,075
Total tax, held over a year$244,879
Effective rate25.4%
If held one year or less$367,329

2027 federal law from the engine: 0/15/20% brackets (Rev. Proc. 2026-35), 25% cap on unrecaptured 1250 gain, ordinary rates on 1245 recapture, 3.8% NIIT over $200,000 single / $250,000 joint (IRC 1411), AMT, and your state's rules (California on the FTB 2026 schedules, because the 2027 schedule is not published yet). What was sold and years held only matter in a few states: Washington exempts real estate, Ohio and New Mexico treat a business sale differently, Arizona subtracts 25% for assets bought after 2011 and Oklahoma deducts gain on Oklahoma property held 5 years or more. Tax shown is the tax caused by the sale. Selling costs are subtracted in the price block above. Excludes local taxes other than Maryland's county tax (3.2% used). Tick the active-owner box if you materially participate in the business. Education only.

Free: your numbers and a worksheet

Get this breakdown by email, plus the one-page Seller Tax Worksheet

We email you the numbers from this page (the gain and the federal, 3.8% and state pieces) with a one-page worksheet to fill in with your CPA: your gain line by line, the tax buckets, the 2027 thresholds and five questions to ask before you sign.

Hans Goldstein
Enrolled Agent, admitted to practice before the IRS

By entering your email you agree to receive this sheet and occasional educational emails from Hans Goldstein: Tax & Exit Planning. Unsubscribe anytime.

What is the four-line method every capital gains calculator uses?

Strip away the interface and every capital gains calculator on a sale of property runs the same four lines. First, the amount realized: the contract price plus any debt the buyer takes over, minus commissions, title and escrow fees, transfer taxes and legal fees you paid to sell (IRC 1001(b); IRS Publication 544). Second, subtract your adjusted basis: what you paid, plus acquisition costs and improvements, minus depreciation (IRC 1016). The result is the gain under IRC 1001(a).

Third, sort the gain by character, because one sale can carry three different federal rates. Fourth, stack it on top of your other income for the year, apply the federal brackets, the net investment income tax and your state. The calculator at the top of this page does all four: enter the price, selling costs, what you paid and the depreciation you took, and it builds the gain, splits it and taxes it. It is only as right as the basis records you give it. Our adjusted basis guide covers the second line in depth.

How do you split the gain, the step most calculators hide?

A single number labeled capital gain is where most free calculators go wrong on business and rental property. The gain from a sale of depreciated property breaks into layers, and they are taxed in this order:

  1. Section 1245 recapture. Gain on equipment, vehicles, furniture and other personal property, up to the depreciation you took, is ordinary income taxed at rates up to 37% (IRC 1245; Rev. Proc. 2026-35 brackets for 2027). It is reported on Form 4797 Part III.
  2. Unrecaptured Section 1250 gain. On buildings, straight-line depreciation taken comes back at a maximum 25% rate (IRC 1(h)(1)(E), 2027).
  3. Long-term capital gain or Section 1231 gain. Everything above original cost on property held more than one year gets 0%, 15% or 20%. See our Section 1231 gain guide for how business property lands here.

In a business sale, the buyer and seller set these layers through the purchase price allocation on Form 8594, which is why the purchase price allocation analysis matters as much as the price. On real estate, the land and building split drives the depreciation that later becomes the 25% layer; our depreciation recapture analysis walks through it.

How much tax on a rental house in Arizona? Worked example 1

A couple bought a rental in 2014 for $700,000, added $60,000 of improvements and claimed $220,000 of depreciation. Adjusted basis: $540,000. They sell for $1,600,000 and pay $96,000 in commissions and closing costs, so the amount realized is $1,504,000 and the gain is $964,000. Of that, $220,000 is unrecaptured 1250 gain and $744,000 is long-term gain.

With $180,000 of other income, the engine shows $192,832 of federal income tax, $33,972 of net investment income tax and $18,075 to Arizona, a total of $244,879 or 25.4% of the gain. Arizona's flat 2.5% rate for 2026 is paired with a subtraction of 25% of net long-term gain on assets acquired after December 31, 2011 (A.R.S. 43-1022(22)), which the engine applies. Rental gain counts as net investment income under IRC 1411, so the 3.8% layer applies above $250,000 of modified AGI for joint filers (not indexed). More on rentals in capital gains tax on rental property.

How much tax on business assets sold in Texas? Worked example 2

An owner-operator sells the assets of a company for a price that produces $350,000 of equipment gain (all depreciation taken, so all 1245 recapture) and $2,000,000 of goodwill and other long-term gain. Texas has no personal income tax, so the bill is federal only: $517,331, with $517,331 of regular federal tax. Because the seller materially participated, gain on business assets is outside the 3.8% NIIT base under IRC 1411(c), a distinction many generic calculators miss.

The recapture slice is the expensive part per dollar: it sits on top of the couple's other income and fills the 32%, 35% and 37% brackets (Rev. Proc. 2026-35, 2027) before any long-term gain is taxed. Shifting allocation from equipment to goodwill, where the facts support it, changes the result more than any rate assumption. Our guide to tax on the sale of a business covers the deal side.

How much tax when a home outgrows the exclusion? Worked example 3

Married owners bought their California home for $900,000 and sell it for $2,400,000 with $130,000 of selling costs. Gain: $1,370,000. Section 121 excludes up to $500,000 for joint filers who owned and lived in the home two of the last five years (IRC 121(b), 2027), leaving $870,000 taxable. The engine puts the tax at $262,827, including $84,527 to California, which taxes capital gains as ordinary income at rates up to 13.3% with the 1% surcharge over $1 million (FTB, 2026).

Two calculator traps apply to homes. Any depreciation taken after May 6, 1997 for a home office or rental use cannot be excluded (IRC 121(d)(6)). And periods of nonqualified use after 2008, such as renting the home before moving in, shrink the exclusion pro rata (IRC 121(b)(5)). Our home sale over the exclusion page goes deeper.

Which input mistakes cost the most, and what do they cost?

  • Leaving out depreciation. Basis drops by depreciation allowed or allowable, even years you forgot to claim it (IRC 1016(a)(2)). Our fourth example re-runs the Arizona rental without the $220,000: the result understates the bill by $80,857, and the return would be wrong.
  • Subtracting the mortgage payoff. Paying off a loan at closing changes your cash, not your gain. Debt relief is part of the amount realized (Publication 544, 2026 revision).
  • Using purchase price as basis on inherited property. Heirs generally use fair market value at death (IRC 1014). See capital gains on inherited property.
  • Treating the whole gain as 15%. Above $633,600 of taxable income for joint filers the rate is 20% (Rev. Proc. 2026-35, 2027), and recapture is never at 15%.
  • Ignoring the state. Real estate gain is generally taxed by the state where the property sits, even if you live elsewhere.
  • Forgetting holding period. Property held one year or less produces short-term gain at ordinary rates (IRC 1222).

When is a capital gains calculator not enough?

A one-year calculator is the right tool for a clean cash sale. It falls short when the answer depends on choices rather than arithmetic:

  • Payments over time. Under a Section 453 installment sale, gain is recognized as cash arrives, but Section 1245 recapture is taxed in the year of sale anyway (IRC 453(i)), while the 25% building layer follows the payments (Treas. Reg. 1.453-12). That needs a multi-year model.
  • Exchanges and reinvestment. A 1031 exchange or an Opportunity Zone investment changes what is taxed this year.
  • Suspended losses and carryovers. Passive losses freed by a full disposition (IRC 469(g)) and capital loss carryovers can offset a large share of the gain. See loss carryovers.
  • Phase-outs and surcharges. A big gain year can push up Medicare premiums and phase out deductions; the NIIT on a sale analysis covers the 3.8% layer.
  • Moving. Changing residency before closing can matter for stock and business interests but rarely for real estate; see state residency change before a sale.

For a written side-by-side of every path on your actual numbers, get the Big Sale Tax Analysis.

What to know

A calculator is a model, and its output is only as good as the basis records and the allocation you feed it. Engine figures here use 2027 federal tables (Rev. Proc. 2026-35) and each state's modeled rule; they exclude local taxes, AMT credit carryovers, phase-outs of specific deductions and Medicare premium surcharges. A sale with seller-carried notes, a business allocation in dispute or property in more than one state deserves a full return projection reviewed by your CPA before you sign.

How much tax does this sale cause? A worked example

Bought 2014 for $700,000, $60,000 of improvements, $220,000 depreciation taken; sold for $1,600,000 with $96,000 of selling costs. Gain $964,000: $220,000 unrecaptured 1250, $744,000 long-term. Joint filers with $180,000 of other income. Owner-operator sells assets: $350,000 of equipment gain is 1245 recapture and $2,000,000 is goodwill and other long-term gain. Joint filers, $200,000 of other income, active in the business so NIIT does not reach the gain. Bought for $900,000, sold for $2,400,000 with $130,000 of costs: $1,370,000 gain less the $500,000 joint exclusion leaves $870,000 taxable. Joint filers with $160,000 of other income. Same Arizona rental as the first example, but the $220,000 of depreciation was left out of basis, so only $744,000 of gain is entered.

Engine runRental house, ArizonaBusiness asset sale, TexasPrimary home over the exclusion, CaliforniaMistake: rental without depreciation
Filing statusMarried, jointMarried, jointMarried, jointMarried, joint
StateArizonaTexasCaliforniaArizona
Other income (wages, pension, interest)$180,000$200,000$160,000$180,000
Long-term capital gain$744,000$2,000,000$870,000$744,000
Unrecaptured Section 1250 gain (25% max)$220,000$0$0$0
Section 1245 recapture (ordinary income)$0$350,000$0$0
Federal income tax on the sale$192,832$517,331$148,660$124,460
Net investment income tax (3.8%)$33,972$0$29,640$25,612
State income tax on the sale$18,075$0$84,527$13,950
Total tax caused by the sale$244,879$517,331$262,827$164,022
Effective rate on the gain25.4%22.0%30.2%22.0%
Gain kept after these taxes$719,121$1,832,669$607,173$579,978

Step by step: Rental house, Arizona

The same example worked by hand from the 2027 federal tables (California: FTB 2026 schedule), so you can follow each line with a calculator. Rounded to the dollar.

  1. The gain. $744,000 long-term capital gain + $220,000 unrecaptured Section 1250 gain = $964,000. Other income that year: $180,000, married filing jointly.
  2. Without the sale. Taxable income is $180,000 less the $33,200 standard deduction = $146,800; regular federal tax on that is $21,379 (2027 brackets, Rev. Proc. 2026-35).
  3. With the sale. Taxable income becomes $1,110,800. The ordinary part ($146,800: other income, less the deduction) is taxed at ordinary rates: $21,379. Of the Section 1250 gain, $220,000 still fits in brackets below 25% ($51,371). The long-term gain: $266,800 at 15%, $477,200 at 20% = $135,460 (0% to $102,100 and 15% to $633,600 of taxable income, 2027). Regular tax with the sale: $208,210.
  4. Federal income tax caused by the sale. $208,210 less $21,379 = $186,831, plus $6,001 of alternative minimum tax the sale triggers (2027 exemption $144,700, phased out above $1,031,900) = $192,832.
  5. Net investment income tax. 3.8% of the smaller of net investment income or income over $250,000 (IRC 1411, not indexed): net investment income from the sale is $964,000; income over the threshold is $894,000. 3.8% x $894,000 = $33,972.
  6. State. Arizona: $18,075 from the engine's state table.
  7. Total. $192,832 + $33,972 + $18,075 = $244,879, which is 25.4% of the gain.

Computed November 21, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2026-35 (IR-2026-133, Nov 5 2026) and the One Big Beautiful Bill Act (P.L. 119-21); NIIT under IRC 1411 (thresholds not indexed); state tax from the engine's state table (California: FTB 2026 rate schedules, the latest published; the 2027 schedule is not out yet, so the California figure is a projection from the 2026 tables). "Tax caused by the sale" = tax with the sale minus tax without it. Excludes selling costs, local taxes and estimated-tax timing. Education only.

Also free: the book Same Sale, Different Tax, the same $1,000,000 gain taxed ten ways. Want it run on your sale? Book a free scope call to see whether the Big Sale Tax Analysis is worth it.

Hans Goldstein

Who you will talk to

Hans Goldstein · Sacramento, California
Hans Goldstein: Tax & Exit Planning, an independent practice. Enrolled Agent, admitted to practice before the Internal Revenue Service. CA Insurance License #4273294, NPN 20602398.

What happens first
You fill in the short form for a free scope call, about 5 minutes. Hans reviews every one personally and replies within 1 business day. If it is a fit, you get a link to book the call.
The scope call
Fifteen minutes, free: price, timeline, what you are selling and what the money is for. Scope means you hear whether the analysis is worth it for your sale.
What you get
A written side-by-side comparison of your cash-sale baseline against every path that fits, year-by-year numbers, a written recommendation, and a review meeting with you and, if you like, your CPA and attorney.
What it costs
The scope call is free. The Big Sale Tax Analysis is $5,000 per household per transaction, only if you decide it is worth it. No retainer, no hourly billing, no obligation to use any strategy.
How Hans is paid
The $5,000 fee pays for analysis only and is not reduced or credited if you buy anything. You are never required to buy anything. No referral fees are paid to or received from brokers, CPAs or attorneys. Hans is also a licensed insurance producer with a separately owned insurance business. That business is not part of this engagement, and the analysis does not recommend insurance products. If you later choose an installment sale funded through an insurance company, that company pays Hans a commission through his separate insurance business. He may be compensated by that business if you use an insurance-funded installment sale. Hans is an Enrolled Agent (EA), admitted to practice before the Internal Revenue Service. He is not a CPA, attorney or registered investment adviser; the analysis models tax effects and does not recommend specific securities. Read the disclosures.

Book a free scope call or call 213-340-2018. Hans answers or calls back the same business day.

Frequently asked questions

How do I calculate capital gains on the sale of property?
Start with the sale price, subtract selling costs to get the amount realized, then subtract your adjusted basis (purchase price plus acquisition costs and improvements, minus depreciation). The difference is your gain under IRC 1001. Split it into depreciation recapture and long-term gain, apply the 2027 federal rates from Rev. Proc. 2026-35, add the 3.8% NIIT if your modified AGI is above the threshold, then add state tax.
How do I calculate capital gains on the sale of a rental property?
Use the same method, but track depreciation. Every dollar of straight-line depreciation on the building comes back as unrecaptured Section 1250 gain taxed at up to 25% (IRC 1(h)(1)(E)), and any furniture or appliances produce Section 1245 recapture at ordinary rates. In our Arizona rental example the total tax is $244,879, of which $33,972 is the 3.8% net investment income tax.
Does paying off my mortgage reduce capital gains tax?
No. The loan payoff comes out of your sale proceeds, but it is not a selling expense and it does not raise your basis. Gain is computed on the full amount realized, including debt relieved, minus adjusted basis (IRS Publication 544). That is why a heavily refinanced property can produce a tax bill larger than the cash you walk away with.
How much capital gains tax do I pay on a $500,000 gain?
It depends on your other income, filing status, state and how much of the gain is recapture. For 2027, joint filers pay 0% on long-term gain up to $102,100 of taxable income, 15% up to $633,600 and 20% above that (Rev. Proc. 2026-35). A gain that size usually triggers the 3.8% NIIT too, unless it comes from an active business or a home exclusion.
What is the capital gains tax on the sale of a primary residence?
Gain up to $250,000 ($500,000 joint) is excluded if you owned and lived in the home two of the last five years (IRC 121). Gain above that is long-term gain taxed at 0/15/20% plus NIIT and state tax. In our California example, $870,000 above the exclusion produces $262,827 of tax.
Are selling costs deductible from capital gains?
Yes, in effect. Commissions, title and escrow fees, transfer taxes, legal fees and advertising reduce your amount realized, which lowers the gain dollar for dollar (IRS Publication 523 for homes, Publication 544 for other property). Repairs made just to sell are not added to basis, but improvements with a life longer than a year are.
How Hans helps: the Big Sale Tax Analysis runs your sale through every path that fits: a cash sale, a Section 453 installment sale, 1031, Opportunity Zones, charitable trusts, timing and loss offsets, year by year, and ends with a written recommendation your CPA can check. See how the analysis works.
Call Hans: 213-340-2018Book a time