How the rental property capital gains tax calculator works
The tax starts with your gain: what you receive from the sale minus your adjusted basis, which is what the property cost you for tax purposes after depreciation.
- P_s
- Sale price
- C_s
- Selling costs: commission and your closing costs
- P_b
- Purchase price
- C_b
- Settlement costs you paid when you bought, such as title, recording and transfer taxes
- I
- Capital improvements: additions, a new roof or systems, not routine repairs
- D
- Depreciation allowed or allowable on the building and improvements
Depreciation is what makes a rental different from a home. Residential rental buildings are depreciated over 27.5 years, so every year you own one lowers your basis and raises the gain, whether or not you claimed the deduction: the IRS reduces basis by the depreciation you were entitled to take. Land is never depreciated, which is why only the building's share of the price counts.
Two parts of the gain, taxed differently
If you owned the property for more than a year, the gain splits in two. The part equal to your depreciation is Unrecaptured Section 1250 Gain, usually called depreciation recapture. It is taxed at your ordinary income tax rates, but never more than 25%. The rest is long-term capital gain, taxed at 0%, 15% or 20% depending on your taxable income, with the 0% rate reaching $49,450 of taxable income for single filers ($98,900 joint) in 2026 and the 20% rate starting above $545,500 ($613,700 joint).
The gain is stacked on top of your other income, so your wages and business profit decide which brackets it lands in. The calculator follows the IRS Schedule D Tax Worksheet line by line to do this. On top of income tax, the Net Investment Income Tax (NIIT) adds 3.8% on the part of the gain that pushes your income above $200,000 ($250,000 if married filing jointly). If you owned the property for a year or less, the whole gain is short-term and taxed as ordinary income.
Worked example: selling a rental after ten years
A single investor bought a rental in June 2016 for $300,000, paid $6,000 in closing costs and later spent $20,000 on a new roof and kitchen. With 80% of the cost allocated to the building, depreciation on the building from then to a sale in November 2026 comes to $92,727.27. (The improvements would be depreciated too; leaving that out keeps the example simple, and the calculator's "From my returns" option takes your actual total.) They sell for $500,000 and pay 6% in selling costs, and they earn $90,000 from their job.
| Amount | |
|---|---|
| Amount realized ($500,000 − 6%) | $470,000.00 |
| Adjusted basis ($326,000 − depreciation) | $233,272.73 |
| Gain on the sale | $236,727.27 |
| Depreciation recapture (taxed up to 25%) | $92,727.27 |
| Long-term capital gain | $144,000.00 |
| Federal income tax on the sale | $43,218.54 |
| Net investment income tax | $4,815.64 |
| Total federal tax | $48,034.18 |
The depreciation recapture lands in the 22% and 24% brackets on top of the investor's salary, costing $21,618.54, an average of 23.3%. The remaining $144,000.00 is taxed at 15%, $21,600.00. Because the sale lifts their income above $200,000, the NIIT adds $4,815.64. In all they owe $48,034.18, 20.3% of the gain, and keep $271,965.82 after paying off a $150,000 mortgage.
Income matters a great deal. The same sale by a married couple with $40,000 of other income owes $33,402.91. Their recapture is taxed at 10% and 12% instead of 22% and 24%, and only the part of their income above $250,000 owes the NIIT, $1,015.64. None of their gain gets the 0% rate, though: the recapture counts first and fills that range.
Owing tax after selling for less than you paid
Depreciation can create a taxable gain even on a sale below the purchase price. An investor who bought a rental for $400,000 in 2020 and sells it for $380,000 in 2026 has taken about $77,149.09 of depreciation, so their basis is down to $330,850.91. After selling costs they still have a $26,349.09 gain, all of it depreciation recapture, and owe about $5,796.80.
State tax on a rental sale, state by state
Most states tax the gain as ordinary income, but some exclude part of it, a few tax it at special rates, and ten don't tax it at all. The table applies each state's 2026 rules to the worked example above, assuming you live in the state where the rental is. Select a state for its own calculator, which applies those rules instead of a flat rate.
| State | How the gain is taxed | State tax |
|---|---|---|
| Alabama | Taxed as ordinary income at the state's income tax rates. | $11,836.36 |
| Alaska | No state income tax, so no Alaska tax on the gain. | $0.00 |
| Arizona | 25% of a long-term gain is subtracted if the property was bought after 2011; the rest is taxed at 2.5%. | $4,438.64 |
| Arkansas | 50% of a long-term gain is exempt (and any gain above $10 million); the rest is taxed at Arkansas's rates. | $4,379.45 |
| California | Taxed as ordinary income at the state's income tax rates. | $22,015.63 |
| Colorado | Taxed as ordinary income at the state's income tax rates. | $10,416.00 |
| Connecticut | Taxed as ordinary income at the state's income tax rates. | $15,094.18 |
| Delaware | Taxed as ordinary income at the state's income tax rates. | $15,624.00 |
| Florida | No state income tax, so no Florida tax on the gain. | $0.00 |
| Georgia | Taxed as ordinary income at the state's income tax rates. | $11,812.69 |
| Hawaii | Long-term gains are taxed at Hawaii's rates but never above 7.25%. | $17,162.73 |
| Idaho | 60% of the gain on Idaho real property held at least 12 months is deducted; the rest is taxed at 5.3%. | $5,018.62 |
| Illinois | Taxed as ordinary income at the state's income tax rates. | $11,862.79 |
| Indiana | Taxed as ordinary income at the state's income tax rates. | $6,983.45 |
| Iowa | Taxed as ordinary income at the state's income tax rates. | $8,995.64 |
| Kansas | Taxed as ordinary income at the state's income tax rates. | $13,209.38 |
| Kentucky | Taxed as ordinary income at the state's income tax rates. | $8,285.45 |
| Louisiana | Taxed as ordinary income at the state's income tax rates. | $7,101.82 |
| Maine | Taxed as ordinary income at the state's income tax rates. | $16,926.00 |
| Maryland | Taxed as ordinary income at the state's income tax rates. | $12,883.81 |
| Massachusetts | Long-term gains are taxed at 5% and short-term gains at 8.5%, plus a 4% surtax on income above $1,107,750. | $11,836.36 |
| Michigan | Taxed as ordinary income at the state's income tax rates. | $10,060.91 |
| Minnesota | Taxed as ordinary income, plus a 1% tax on net investment income above $1 million. | $20,383.97 |
| Mississippi | Taxed as ordinary income at the state's income tax rates. | $9,469.09 |
| Missouri | Missouri deducts 100% of capital gains, so the gain isn't taxed by the state. | $0.00 |
| Montana | Long-term gains are taxed at 3.0%, or 4.1% above $47,500 of taxable income ($95,000 joint). | $9,705.82 |
| Nebraska | Taxed as ordinary income at the state's income tax rates. | $10,771.09 |
| Nevada | No state income tax, so no Nevada tax on the gain. | $0.00 |
| New Hampshire | No state income tax, so no New Hampshire tax on the gain. | $0.00 |
| New Jersey | Taxed as ordinary income at the state's income tax rates. | $15,079.53 |
| New Mexico | Up to $2,500 of the gain is deducted; the rest is taxed at New Mexico's rates. | $12,458.41 |
| New York | Taxed as ordinary income at the state's income tax rates. | $14,948.52 |
| North Carolina | Taxed as ordinary income at the state's income tax rates. | $9,445.41 |
| North Dakota | 40% of a long-term gain is excluded; the rest is taxed at North Dakota's low rates. | $2,769.71 |
| Ohio | Taxed as ordinary income at the state's income tax rates. | $6,509.99 |
| Oklahoma | The whole gain is deductible on Oklahoma real property owned at least five years; otherwise ordinary income. | $0.00 |
| Oregon | Taxed as ordinary income at the state's income tax rates. | $23,256.03 |
| Pennsylvania | Taxed as ordinary income at the state's income tax rates. | $7,267.53 |
| Rhode Island | Taxed as ordinary income at the state's income tax rates. | $13,680.35 |
| South Carolina | 44% of a long-term gain is deducted; the rest is taxed at South Carolina's rates. | $6,977.80 |
| South Dakota | No state income tax, so no South Dakota tax on the gain. | $0.00 |
| Tennessee | No state income tax, so no Tennessee tax on the gain. | $0.00 |
| Texas | No state income tax, so no Texas tax on the gain. | $0.00 |
| Utah | Taxed as ordinary income at the state's income tax rates. | $10,567.13 |
| Vermont | 40% of the gain other than depreciation is excluded on property held over three years (or a flat $5,000), within caps. | $13,261.66 |
| Virginia | Taxed as ordinary income at the state's income tax rates. | $13,611.82 |
| Washington | Washington's capital gains tax exempts real estate, and it has no income tax. | $0.00 |
| West Virginia | Taxed as ordinary income at the state's income tax rates. | $10,842.11 |
| Wisconsin | 30% of a long-term gain is excluded; the rest is taxed at Wisconsin's rates. | $9,078.02 |
| Wyoming | No state income tax, so no Wyoming tax on the gain. | $0.00 |
| District of Columbia | Taxed as ordinary income at the state's income tax rates. | $20,576.52 |
Ways to reduce or defer the tax
- A 1031 exchange. Reinvesting the proceeds in another investment or business property defers the whole tax, recapture included. You must identify the replacement property within 45 days and receive it within 180 days, usually through a qualified intermediary so you never touch the cash. Cash you keep, called boot, is taxed. The deferred gain carries into the new property's basis rather than disappearing.
- Holding past one year. A gain on property owned a year or less is taxed as ordinary income. Waiting until you have owned it more than a year to the day moves most of the gain to the 0%, 15% or 20% capital gains rates.
- Selling in a lower-income year. Because the gain stacks on your other income, a year with less salary or business income can keep more of it in the 0% or 15% range and below the NIIT threshold.
- An installment sale. If you finance part of the price for the buyer, the gain is taxed over the years you collect it, which can keep more of it in lower brackets.
- Keeping records of improvements and costs. Every documented improvement and settlement cost raises your basis and lowers the gain.
- Using suspended losses. Passive losses you couldn't deduct in earlier years generally become deductible when you sell your entire interest to an unrelated buyer, offsetting part of the income.
If you lived in the property as your main home for at least two of the five years before the sale, you may be able to exclude up to $250,000 of gain ($500,000 for most married couples filing jointly), although the part from depreciation stays taxable and periods of rental use can reduce the exclusion. The Section 121 exclusion calculator works out how much.
Flipping is different: if you buy and sell properties as a business, the profit is ordinary income and may be subject to self-employment tax as well; the 1099 tax calculator estimates that, and the S corp tax savings calculator shows what an S corporation election could save on it. Before you list, the DSCR loan calculator shows whether a cash-out refinance on the rent could work instead of a sale.
The bottom line
Rental property capital gains tax has three federal layers: depreciation recapture at your ordinary rates up to 25%, the 0%, 15% or 20% rate on the rest of the gain, and the 3.8% net investment income tax at higher incomes. In the example, a $500,000 sale after ten years costs $48,034.18 in federal tax, 20.3% of the gain.
Gather your depreciation schedule and improvement records before you list, add your state's tax, and compare a sale with a 1031 exchange in the rental property capital gains tax calculator while there is still time to plan one.
Frequently asked questions
How is capital gains tax on a rental property calculated?
Start with the amount realized, the sale price minus selling costs, and subtract your adjusted basis: the purchase price plus buying costs and capital improvements, minus depreciation. The part of that gain equal to your depreciation is taxed at your ordinary rates up to 25%; the rest is taxed at 0%, 15% or 20% if you owned the property more than a year. The 3.8% net investment income tax can apply on top.
What is depreciation recapture on a rental property?
When you sell a rental at a gain, the part of the gain that comes from depreciation you took, called unrecaptured section 1250 gain, is taxed at your ordinary income tax rate but no more than 25%, instead of the lower capital gains rates. It is the IRS taking back part of the tax benefit the depreciation deductions gave you while you owned the property.
Do I owe depreciation recapture if I never claimed depreciation?
Yes. Your basis is reduced by the depreciation that was allowed or allowable, so depreciation you were entitled to but didn't claim still raises your gain and is taxed as recapture. If you missed depreciation in earlier years, you can usually still deduct it, even in the year you sell, by filing Form 3115 to change your accounting method; ask a tax professional.
Does the 3.8% net investment income tax apply when I sell a rental?
Usually. Gain from selling rental property is net investment income unless the rental was part of a business you materially participated in, for example as a qualifying real estate professional. The tax is 3.8% of the smaller of the gain or the amount your modified adjusted gross income exceeds $200,000 ($250,000 if married filing jointly).
Can a 1031 exchange avoid capital gains tax on a rental?
A 1031 exchange defers it rather than avoiding it. If you reinvest the proceeds in like-kind investment or business real estate, identifying it within 45 days and closing within 180, you owe no tax now, including on depreciation recapture. The deferred gain reduces the new property's basis and comes due when you eventually sell without exchanging, although heirs who inherit the property generally receive a stepped-up basis.
What if I owned the rental for less than a year?
Then the gain is short-term and taxed as ordinary income at your regular rates, with no separate depreciation recapture rate. Owning the property for more than a year to the day makes the gain long-term, which usually lowers the tax substantially.
Do I owe tax if I sell my rental for less than I paid?
You can. Depreciation lowers your adjusted basis every year, so a sale below the original price can still produce a gain, taxed as depreciation recapture. If the amount realized is below your adjusted basis, you have a loss instead: selling a rental at a loss after holding it more than a year generally gives an ordinary loss you can deduct.
Sources and further reading
- Publication 544, Sales and Other Dispositions of Assets (opens in a new tab), Internal Revenue Service
- Publication 527, Residential Rental Property (opens in a new tab), Internal Revenue Service
- Instructions for Schedule D (Form 1040) (opens in a new tab), Internal Revenue Service
- About Form 8960, Net Investment Income Tax (opens in a new tab), Internal Revenue Service
- Instructions for Form 8824, Like-Kind Exchanges (opens in a new tab), Internal Revenue Service
- IRS releases tax inflation adjustments for tax year 2026 (opens in a new tab), Internal Revenue Service
Related calculators
- Rental Property Depreciation CalculatorDon't know how much depreciation you've taken? Build the schedule from the IRS tables, improvements included.
- 1031 Exchange CalculatorBuying another rental with the proceeds? See how much of the gain a 1031 exchange defers.
- Hard Money Loan CalculatorFlipping your next property? Model the rehab loan, cash to close and the flip's profit before tax.