Learn About Capital Gains Tax When Selling Your Home
How Capital Gains Tax Works on Home Sales When you sell your home for more than you paid for it, the profit is called a capital gain. Capital gains tax is a...
How Capital Gains Tax Works on Home Sales
When you sell your home for more than you paid for it, the profit is called a capital gain. Capital gains tax is a federal tax on that profit. Understanding how this tax works is important because it affects how much money you keep after selling your home.
The basic formula is simple: the sale price minus what you originally paid equals your gain. For example, if you bought a house for $300,000 and sold it for $400,000, you have a $100,000 gain. However, the calculation is more complex in real life because you can add certain costs to your original purchase price and subtract selling expenses from the sale price.
Capital gains taxes are different from income taxes. When you earn money from your job, you pay income tax on that money. Capital gains taxes apply to profits from selling assets—including your home. The federal government taxes capital gains, and many states also charge state capital gains tax on home sales. Some states do not have capital gains taxes, which can make a significant difference in your final tax bill.
There are two types of capital gains: short-term and long-term. Short-term capital gains apply to assets you owned for one year or less. Long-term capital gains apply to assets you owned for more than one year. Long-term capital gains typically have lower tax rates than short-term gains. Most homeowners have long-term gains because they own their homes for several years before selling.
The tax rate on long-term capital gains depends on your income level. For 2024, the federal rates are 0%, 15%, or 20% depending on your total income. Lower-income households may not owe any federal capital gains tax on their home sale. Higher-income households pay 20%. Most people fall into the 15% bracket. Short-term capital gains are taxed at your regular income tax rate, which can be as high as 37%.
Practical takeaway: Calculate your profit by subtracting your original purchase price (plus improvements) from your sale price (minus selling costs). Then determine whether your gain qualifies for the lower long-term capital gains rates. Your income level determines which tax rate applies.
The Section 121 Exclusion: Tax-Free Profits
One of the most important tax benefits for homeowners is the Section 121 exclusion, also called the primary residence exclusion. This rule allows you to exclude a large portion of your home sale profit from capital gains tax entirely. For single filers, you can exclude up to $250,000 of gains. For married couples filing jointly, the exclusion is up to $500,000. This means many homeowners owe zero capital gains tax when they sell.
To use the Section 121 exclusion, you must meet specific requirements. First, you must have owned the home for at least two of the five years before the sale. Second, you must have lived in the home as your primary residence for at least two of those same five years. The two-year periods do not need to be consecutive. For example, you could own a home for six years but only live in it for two years—as long as those two years occur within five years of the sale date.
If you are married and file jointly, both spouses do not need to meet the requirements. However, you generally cannot use the exclusion if you used it on another home sale within the past two years. There are limited exceptions to this rule. For instance, if you had a change in workplace location, health issues, or unforeseen circumstances, you may be able to claim a partial exclusion even if you have not waited two years.
Let's look at an example. Tom and Susan bought their home for $250,000 and sold it for $550,000, creating a $300,000 gain. As a married couple filing jointly, they can exclude $500,000 of capital gains. Since their gain is only $300,000, they owe zero federal capital gains tax on this sale. They still pay state taxes (if their state has them), but the federal tax is eliminated.
However, the Section 121 exclusion has limits. If your gain exceeds the exclusion amount, you owe tax only on the excess. Using the same example, if Tom and Susan's gain was $700,000, they would exclude $500,000 and owe federal capital gains tax on the remaining $200,000. Additionally, the exclusion applies only to your primary residence—the home where you live most of the year. Investment properties, vacation homes, and rental properties do not qualify.
Practical takeaway: Check whether you have lived in your home for at least two of the past five years. If yes, you likely can exclude a significant portion of your gains from federal capital gains tax. Single filers exclude up to $250,000; married couples filing jointly exclude up to $500,000.
Calculating Your Cost Basis and Adjusted Basis
Your cost basis is the amount you originally paid for your home. However, the actual number you use for tax purposes—called adjusted basis—includes more than just the purchase price. Understanding adjusted basis is crucial because a higher basis reduces your taxable gain.
Your adjusted basis starts with the price you paid for the home. Then you add the cost of permanent improvements you made. Permanent improvements add to the value and lifespan of your home. Examples include a new roof, a new foundation, an addition to the house, new windows, a deck, hardwood flooring, a new kitchen, new plumbing, or a new HVAC system. These are capital improvements and can be added to your basis.
Do not confuse improvements with repairs and maintenance. Repairs fix problems without adding value. Examples include fixing a leaky roof (rather than replacing it), repainting existing walls, or fixing a broken window. Repairs cannot be added to your basis. The line between a repair and an improvement can be unclear. Generally, if the work extends the life of the property or adds value, it is an improvement. If it simply maintains the current condition, it is a repair.
Keep detailed records of all improvements. Collect receipts, invoices, and contracts for any work done on your home. Take photos before and after improvements are completed. If you paid for improvements over many years, organize them by year. This documentation becomes essential if the IRS ever questions your basis calculation.
Some home improvements qualify for special treatment. For example, energy-efficient improvements (like solar panels) and accessibility improvements (like wheelchair ramps) may have different rules. Also, if you received a casualty loss deduction after a disaster, that reduces your basis. State property tax assessments may also affect basis in some situations.
Here is an example: Sarah bought her home for $200,000. Over the years, she added a second bathroom ($25,000), replaced the roof ($15,000), painted the interior ($5,000), and installed new flooring ($12,000). Her adjusted basis is $257,000. The painting does not count as an improvement because it is routine maintenance. When she sells for $450,000, her taxable gain is $193,000 (before applying the Section 121 exclusion).
Practical takeaway: Add your purchase price plus all permanent improvements made during ownership. Keep receipts for any major work. Do not include routine repairs and maintenance. This adjusted basis number reduces your capital gain and therefore your tax bill.
Selling Expenses and What You Can Deduct
Selling expenses reduce your capital gain, which reduces the amount of capital gains tax you owe. Understanding which costs can be deducted from your sale price is important for calculating your actual gain accurately.
Real estate commissions are the most common selling expense. When you sell through a real estate agent, you typically pay a commission of 5% to 6% of the sale price. This commission is fully deductible from your sale price. If you sold your home for $400,000 with a 6% commission, you deduct $24,000, reducing your taxable proceeds to $376,000.
Closing costs paid by the seller also reduce your proceeds. These costs include title insurance, attorney fees, property surveys, home inspections, appraisals, and recording fees. Some closing costs are paid by the buyer instead of the seller—those do not benefit your calculation. But costs you pay reduce your taxable gain. Keep your closing statement from the sale; it itemizes which costs you paid.
Advertising and marketing expenses for selling your home are deductible. If you paid for professional photography
Related Guides
More guides on the way
Browse our full collection of free guides on topics that matter.
Browse All Guides →