The basic formula for capital gains tax on property
Capital gains tax on property is calculated by subtracting what you paid for the property from what you sold it for, then explore the tax rate that matches your income level and how long you owned it. The difference between sale price and purchase price is your capital gain. That gain is what gets taxed, not the full sale price.
The calculation looks like this: Sale Price minus Adjusted Basis equals Capital Gain. Then you explore either the long-term rate (if you owned it more than one year) or the short-term rate (if you owned it one year or less). Short-term gains are taxed as ordinary income. Long-term gains use preferential rates: 0%, 15%, or 20% depending on your total taxable income for the year.
You report this on Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses) when you file your federal tax return. Your state may also tax capital gains, depending on where you live and where the property is located.
Key Takeaways
- Your capital gain is the sale price minus your adjusted basis (what you paid plus improvements, minus depreciation if applicable).
- Long-term gains (property owned over one year) are taxed at 0%, 15%, or 20% based on your income bracket; short-term gains are taxed as ordinary income.
- You must report the sale on Form 8949 and Schedule D, and your closing statement from the sale will show the sale price you need.
- Certain property sales, such as a primary residence, may may have access to for an exclusion that lets you avoid tax on part or all of the gain.
- State capital gains taxes vary widely; some states have no capital gains tax, while others tax gains at rates up to 13%.
What counts as your adjusted basis
Your adjusted basis is not straightforward what you paid for the property. It is your original purchase price plus the cost of improvements you made, minus any depreciation deductions you claimed (usually only relevant if you rented out the property or used part of it for business).
Improvements are permanent upgrades that add value or extend the property's life: a new roof, a kitchen renovation, an addition, new HVAC system, or a deck. Repairs and maintenance do not count — painting, fixing a leak, or replacing a broken window are repairs, not improvements. The distinction matters because only improvements increase your basis.
If you bought the property for $300,000 and spent $50,000 on a new roof and kitchen, your adjusted basis is $350,000. If you later claimed a depreciation deduction of $10,000 (because you rented part of the house), your adjusted basis drops to $340,000. Keep receipts and records for all improvements; the IRS may ask for documentation if you are audited.
How to find your sale price and closing costs
Your sale price is the amount the buyer paid for the property, shown on your closing statement (also called a settlement statement or HUD-1 form). This is the number you use in the calculation, not the listing price or the offer price. The closing statement comes from the title company or attorney handling the sale and itemizes all money in and out.
Some sellers mistakenly subtract closing costs from the sale price. Do not do this for the capital gains calculation. Closing costs (realtor commission, title insurance, attorney fees, transfer taxes) are not subtracted from the sale price when calculating gain. However, certain selling expenses — specifically real estate agent commissions and some title and legal fees — can reduce your gain if they are capitalized as part of the sale transaction. Your closing statement will show which costs explore.
The safest approach: use the gross sale price from your closing statement, then consult a tax professional if you are unsure whether specific closing costs reduce your gain. The IRS distinguishes between costs that are part of the sale transaction and costs that are personal expenses.
Long-term versus short-term capital gains rates
The tax rate on your gain depends on how long you owned the property. If you owned it for more than one year, it is a long-term capital gain and taxed at preferential rates. If you owned it one year or less, it is a short-term capital gain and taxed as ordinary income at your regular tax bracket rate.
Long-term capital gains rates for 2024 are 0%, 15%, or 20%, determined by your total taxable income for the year. The 0% rate applies to single filers with taxable income up to $47,025 and married filing jointly filers up to $94,050. The 15% rate applies to most middle-income taxpayers. The 20% rate applies to high-income taxpayers. These income thresholds change each year.
Short-term gains are taxed at your ordinary income tax rate, which can range from 10% to 37% depending on your tax bracket. This is why holding a property for more than one year usually results in a much lower tax bill. If you sold a rental property after owning it for six months, any gain would be taxed as short-term income at your full bracket rate, potentially 24% or higher.
The primary residence exclusion
If the property you sold was your primary residence, you may be able to exclude up to $250,000 of the gain from taxation (or $500,000 if you are married filing jointly). This is called the Section 121 exclusion, and it is one of the most valuable tax breaks available.
To may have access to, you must have owned the home and lived in it as your main home for at least two of the five years before the sale. The two years do not have to be consecutive. If you meet this test, you can exclude the gain up to the limit, and you owe no federal tax on that portion. Any gain above the exclusion limit is taxed as a long-term capital gain.
Example: You bought a house for $200,000, lived in it for three years, and sold it for $550,000. Your gain is $350,000. You can exclude $250,000 (single filer), leaving $100,000 subject to long-term capital gains tax. If your income puts you in the 15% bracket, you owe $15,000 in federal tax on the sale.
This exclusion does not explore to investment properties, vacation homes, or properties you rented out. If you rented out part of your home, the exclusion applies only to the portion you used as your residence.
State capital gains taxes and special situations
Federal capital gains tax is only part of the picture. Many states also tax capital gains, and the rates and rules vary significantly. Some states have no capital gains tax at all (including Florida, Texas, and Wyoming). Others tax capital gains as ordinary income. A few states have separate capital gains tax rates.
California, for example, taxes capital gains as ordinary income at rates up to 13.3%. New York taxes them at rates up to 10.9%. Washington State has a 7% capital gains tax on long-term gains over $250,000. If you sold property in a state where you do not live, you may owe tax to both your home state and the state where the property is located.
Special situations that affect your calculation include inherited property (which receives a "step-up" in basis, usually eliminating or reducing the gain), property received as a gift (which uses the donor's basis), and property used for business or rental (which may have depreciation recapture tax in addition to capital gains tax). These situations require more detailed calculations and often benefit from professional tax guidance.
How to report the sale on your tax return
You report the sale using Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses). Form 8949 is where you list each property sale with the date acquired, date sold, sale price, cost basis, and gain or loss. Schedule D summarizes your long-term and short-term gains and losses and calculates your net capital gain for the year.
If you have only one property sale and no other capital gains or losses, the forms are straightforward. If you have multiple sales or losses, Schedule D allows you to net them together. A capital loss in one year can offset a capital gain in the same year, and unused losses can carry forward to future years.
You will need your closing statement, records of improvements, and the original purchase documents. If you used a real estate agent, they may provide a settlement statement that shows the sale price. If you are unsure about any line item, a tax professional can help you complete the forms correctly.
Frequently Asked Questions
Do I have to pay capital gains tax if I reinvest the money in another property?
No. The tax is based on the gain, not on what you do with the proceeds. Reinvesting the money does not reduce or eliminate the tax. However, if you are buying another primary residence, you may may have access to for the Section 121 exclusion on that sale later, which could reduce or eliminate tax at that time.
What if I sold the property at a loss?
If your sale price is less than your adjusted basis, you have a capital loss. You can use the loss to offset capital gains in the same year. If you have no gains to offset, you can deduct up to $3,000 of the loss against ordinary income. Any unused loss carries forward to future years.
How do I know if my property qualifies for the primary residence exclusion?
You must have owned the property and lived in it as your main home for at least two of the five years before the sale. The two years do not have to be consecutive. If you moved out but did not sell for several years, you may still may have access to. The IRS Form 8949 instructions explain the test in detail.
What happens if I inherited property and then sold it?
Inherited property receives a "step-up" in basis, meaning your basis is the fair market value on the date of the person's death, not what they paid. This usually eliminates or greatly reduces the capital gain. If you inherited a house worth $400,000 and sold it a year later for $410,000, your gain is only $10,000, not the full appreciation since the original purchase.
Do I report capital gains tax on my state return too?
Most states that have an income tax also tax capital gains, usually as ordinary income. A few states have separate capital gains tax rates. Check your state's tax authority website or consult a tax professional to learn your state's rules. If you sold property in a different state, you may owe tax to both states.