The tax rate depends on how long you owned the property and your total income
Capital gains tax on real estate is calculated using one of two rates: long-term (if you owned it more than one year) or short-term (if you owned it one year or less). Long-term rates are lower and are what most home sellers encounter. Short-term gains are taxed as ordinary income at your regular tax bracket, which is typically higher.
Long-term capital gains rates are 0%, 15%, or 20%, depending on your total taxable income for the year. The income thresholds that determine which rate applies change annually and differ based on whether you file as single, married filing jointly, or head of household. For 2024, the 15% rate applies to most middle-income sellers; the 0% rate is available to lower-income filers; and the 20% rate applies to high-income filers.
The amount you owe is calculated on your gain, not the sale price. Your gain is the sale price minus what you paid for the property, minus certain improvements you made, minus selling costs like realtor commissions and closing fees. If you bought a house for $300,000, spent $50,000 on a new roof and kitchen, and sold it for $500,000 after paying $30,000 in realtor fees, your gain is $120,000 (not $200,000).
Key Takeaways
- Long-term capital gains rates (0%, 15%, or 20%) apply if you owned the property for more than one year; short-term rates (your ordinary income tax bracket) apply if you owned it one year or less.
- Your taxable gain is the sale price minus your purchase price, minus the cost of improvements, minus selling expenses — not the full sale price.
- Primary residence sales may exclude up to $250,000 of gain (or $500,000 if married filing jointly) if you meet ownership and use tests.
- State and local taxes on capital gains vary widely; some states have no capital gains tax, while others tax it as ordinary income.
- The income thresholds for each federal rate change every year and depend on your filing status.
How the federal rates work in 2024
The three long-term capital gains rates are structured so that lower-income households pay less. For 2024, if you file as single, the 0% rate applies to gains up to $47,025 of taxable income; the 15% rate applies from $47,025 to $518,900; and the 20% rate applies to anything above that. If you file as married filing jointly, those thresholds are roughly double.
This means a single person with $40,000 in other income who has a $30,000 capital gain pays 0% on the gain (because their total taxable income stays under $47,025). A single person with $50,000 in other income and a $30,000 gain pays 15% on the portion of the gain that pushes them over $47,025. The IRS publishes updated thresholds each January, so the exact numbers shift year to year.
Short-term gains — from property you owned one year or less — are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your bracket. Most real estate sales are long-term because people hold property longer than a year, but investors who flip properties quickly face short-term rates.
The primary residence exclusion
If the property was your main home, you may exclude up to $250,000 of gain from federal tax (or $500,000 if you are married filing jointly and both spouses meet the test). To may have access to, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale.
This exclusion is per person, not per property, and you can use it only once every two years. If you sold a home two years ago and used the exclusion, you cannot use it again until two years have passed. The exclusion applies to the gain, not the sale price — so if your gain is $150,000, you owe tax on $0 (because $150,000 is less than $250,000). If your gain is $400,000, you owe tax on $150,000.
Inherited property and investment properties do not may have access to for this exclusion. If you rent out the home or use it as a vacation property, the exclusion does not apply.
State and local taxes on capital gains
Federal tax is only part of the bill. Most states tax capital gains, and the rate varies dramatically. Nine states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire), so residents pay no state capital gains tax. Other states tax capital gains as ordinary income, meaning rates can reach 10% or higher.
California, for example, taxes long-term capital gains at the same rate as ordinary income, with a top rate of 13.3%. New York's top rate on capital gains is 10.9%. Some states, like Maryland and Vermont, have separate capital gains tax rates that are lower than ordinary income rates but still apply. A few states, including Washington and Illinois, have recently enacted capital gains taxes that apply only to high-income filers.
You owe state tax in the state where you live when you sell, not necessarily where the property is located. If you live in Florida and sell a rental property in New York, you owe Florida tax (none) but not New York state tax. If you live in California and sell a property in Nevada, you owe California tax on the gain.
What counts as an improvement versus maintenance
You can subtract the cost of improvements from your gain, which lowers your taxable amount. An improvement adds value to the property, prolongs its life, or adapts it to a new use. A new roof, kitchen renovation, addition, or new HVAC system all count. Maintenance and repairs — fixing a leaky roof, repainting, replacing a broken window — do not count and cannot be subtracted.
The line between the two is not always clear. Replacing a roof because it is old and worn counts as an improvement. Patching a roof to fix a leak is maintenance. Replacing old flooring with new flooring of the same type is maintenance; replacing it with a higher-grade material is an improvement. Keep receipts and documentation for any work done, and note whether the contractor described it as a repair or an upgrade.
Selling costs you can deduct from the sale price
Realtor commissions, title insurance, attorney fees, and inspection costs paid by you at closing all reduce your sale price for tax purposes. If you paid $15,000 in realtor commission and $2,000 in closing costs, your net sale price is $2,000 less than the actual sale price. This lowers your gain and therefore lowers your tax bill.
Costs you cannot deduct include mortgage interest (that is deducted separately if you itemize), property taxes paid before the sale, and costs of selling your next home. Only costs directly tied to selling this specific property count.
What happens if you inherited the property
Inherited real estate receives a stepped-up basis, which means your cost basis is the property's fair market value on the date of the owner's death, not what the original owner paid. If your parent bought a house for $100,000 and it was worth $400,000 when they died, your basis is $400,000. If you sell it immediately for $400,000, you owe $0 in capital gains tax because your gain is $0.
This stepped-up basis applies only to inherited property and only at death. If you received the property as a gift while the owner was alive, you inherit their original cost basis, not the current value. The stepped-up basis rule is set to expire at the end of 2025 under current law, though Congress may extend it.
Frequently Asked Questions
Do I owe capital gains tax if I sell my primary home at a loss?
No. Capital losses on personal residences cannot be deducted from your taxes. If you sell your home for less than you paid, you simply report no gain and owe no tax. You cannot use the loss to offset other income or gains.
What if I owned the property for exactly one year — is it long-term or short-term?
Short-term. The IRS rule is "more than one year," so you must own it for at least one year plus one day. If you bought on January 15, 2023, and sold on January 15, 2024, it is short-term. If you sold on January 16, 2024, it is long-term.
Can I deduct a loss on a rental property I sold?
Yes, but only up to $3,000 per year against ordinary income. If your loss is larger, you carry the excess forward to future years. Capital losses on investment property can also offset capital gains from other investments in the same year.
Do I owe capital gains tax on a property I received in a divorce settlement?
Not at the time of transfer. The property is transferred at its fair market value, which becomes your new basis. When you later sell it, you owe tax only on the gain from that point forward. The original owner's gain is not your responsibility.
What if I lived in the home for only part of the time I owned it?
You may still may have access to for the primary residence exclusion if you lived there for at least two of the five years before the sale. The years do not have to be consecutive. If you lived there for two years, rented it out for three years, and then sold it, you still may have access to — but you owe tax on the gain from the years you rented it out.