How long do you have to live in a house to avoid capital gains tax

courtneyk | E+ | Getty Images

With soaring home values, many sellers expect a sizable profit when listing their property. However, capital gains taxes may put a damper on their windfall. 

Home sales profits are considered capital gains, taxed at federal rates of 0%, 15% or 20% in 2021, depending on income.

The IRS offers a write-off for homeowners, allowing single filers to exclude up to $250,000 of profit and married couples filing together can subtract up to $500,000.

More from Personal Finance:
Here are must-know changes for the 2021 tax season
How to pay 0% capital gains taxes with a six-figure income
Consider these year-end tips to lower your tax bill or boost your refund

But these thresholds haven't changed since 1997, and median home sales prices have more than doubled over the past two decades, affecting many long-term homeowners. 

"It's become a huge part of the conversation now," said John Schultz, a CPA and partner at Genske, Mulder & Company in Ontario, California.

While the exemption may be significant for some homeowners, there are strict guidelines to qualify. Sellers must own and use the home as their primary residence for two of the five years preceding the sale.

"But the two years don't have to be consecutive," said Mary Geong, a Piedmont, California-based CPA and enrolled agent at the firm in her name.

Someone owning two homes may split time between the properties, and if their cumulative time living at one place equals at least two years, they may qualify.

Moreover, someone may convert a rental property to a primary residence for two years for a partial exclusion. In that case, the write-off is based on the percentage of their time spent living there, she explained.

For example, if a single filer owns a rental property for 10 years and lives there for two, they may be eligible for 20% of the $250,000 exclusion or $50,000.

"But you need good recordkeeping," Geong added.

Increase basis to reduce profits

If homeowners exceed the exemptions and owe taxes, they may reduce profits by adding certain home improvements to the original purchase price, known as basis, Schultz explained.

For example, home additions, patios, landscaping, swimming pools, new systems and more may qualify as improvements, according to the IRS. 

However, ongoing repairs and maintenance expenses that don't add value or prolong the home's life, such as painting or fixing leaks, won't count. 

How long do you have to live in a house to avoid capital gains tax

Of course, homeowners need to show proof of improvements, which can be difficult after many years. However, if someone lost receipts, there may be other methods.

"Property tax history can help you go back and recalculate some of that," Schultz pointed out, explaining how reasonable estimates may be acceptable. 

Homeowners may also increase basis by adding certain closing costs, such as title, legal or surveying fees, along with title insurance.

Other tax consequences

There's also the possibility of other tax consequences when selling a home with a large profit.

For example, boosting adjusted gross income can affect eligibility for health insurance subsidies, and may require someone to pay back premium credits at tax time.

And retirees increasing income may trigger higher future payments for Medicare Part B and Part D premiums.

"If you're selling any asset of significance, you should be talking to some type of advisor," Schultz said.

A financial advisor or tax professional can project possible outcomes depending on someone's complete situation to help them pick the best move.

You sold your home and hopefully made a big profit. Congratulations! However, as in most situations where you make a buck, the tax collector comes eventually. The IRS is going to want its piece of the pie.

This article is going to look at the topic of capital gains on a home sale, how they’re treated, calculations and how homeowners can avoid or minimize tax liability when selling their home.

Every situation is different. Nothing in this article should be treated as personalized tax advice. If you’re unsure of your tax liability or eligibility for any exemptions or exceptions discussed, speak with a financial advisor or other tax professional.

What Is The Capital Gains Tax On Home Sales?

Capital gains tax is a toll on the profit from the sale of an item, a stock, a home or anything else that can appreciate in value while you own it. For the sake of this article, we’ll focus specifically on the profits of a home sale.

So how does the capital gains tax work? If you bought your home for $200,000 5 years ago and you just recently sold it for $250,000, you made a $50,000 profit. That $50,000 would then be eligible for the capital gains tax.

There are also capital improvements to take into consideration. These are home improvements that contribute to the cost basis of your home. If you made a $50,000 renovation to your home originally bought for $150,000, the cost basis for your home would increase to $200,000. This makes the profit of your sale $0, and it would not be subject to the capital gains tax.

Let’s go over the current capital gains tax rates for 2022, how they’re calculated, exclusions and some answers to frequently asked questions about capital gains on home sales.

What Are The Capital Gains Tax Rates On Real Estate?

Capital gains tax rates on real estate depend on whether you’re in a long-term or a short-term situation. Below, we’ve defined long-term versus short-term capital gains, laying out what the capital gains tax rates on real estate are for 2022.

Long-Term Capital Gains Rates For 2022

If you’ve owned your house for over a year, it’s considered a long-term capital gain. These rates are much lower than rates for the standard income tax. Here are the long-term capital gains tax rates on real estate for 2022:

Tax Rate

Single

Married Filed Jointly And Surviving Spouse

Married Filing Separately

Head Of Household

Trusts And Estates

0%

Up to $41,675

Up to $83,350

Up to $41,675

Up to $55,800

Up to $2,800

15%

$41,675 – $459,750

$83,350 – $517,200

$41,675 – $258,600

$55,800 – $488,500

$2,801 – $13,699

20%

$459,750 or more

$517,200 or more

$258,600 or more

$488,500 or more

More than $13,700

Short-Term Capital Gains Rates For 2022

On the other hand, if you’ve owned your house for less than a year, it’s considered a short-term capital gain. This means your rate should be the same as your income tax rate. Here are the short-term capital gains tax rates on real estate for 2022:

Tax Rate

Single

Married Filed Jointly And Surviving Spouse

Married Filing Separately

Head Of Household

10%

$0 – $10,275

$0 – $20,550

$0 – $10,275

$0 – $14,650

12%

$10,276 – $41,775

$20,551 – $83,550

$10,276 – $41,775

$14,651 – $55,900

22%

$41,776 – $89,075

$83,551 – $178,150

$41,776 – $89,075

$55,901 – $89,050

24%

$89,076 – $170,050

$178,151 – $340,100

$89,076 – $170,050

$89,051 – $170,050

32%

$170,051 – $215,950

$340,101 – $431,900

$170,051 – $215,950

$170,051 – $215,950

35%

$215,951 – $539,900

$431,901 – $647,850

$215,951 – $539,900

$215,951 – $539,900

37%

$539,900 or more

$647,850 or more

$539,900 or more

$539,900 or more

Short-term capital gains sold by an estate or trust have their own set of tax rates. Here are those tax rates for 2022:

Tax Rate

Estimate Or Trust Income

10%

$0 – $2,650

24%

$2,650 – $9,550

35%

$9,550 – $13,050

37%

Over $13,050

How Is The Capital Gains Tax On Home Sales Calculated?

Before you can calculate how much you owe in taxes on any home sale, you need to figure out your tax basis in the property. In simple terms, the basis is the amount of capital investment you have in the property for tax purposes. That tax basis is going to depend on how you came to own your home.

If You Bought Your Home

If you’re buying a home, the cost basis in the property starts with the purchase price. Certain closing costs for the home are also included. If you have any expenses you put into the property for remodeling or construction that adds to the value of the property or prolongs its life, those are also part of your cost basis. Finally, if you pay any taxes that the seller was supposed to pay, this also counts as part of your basis.

Here’s a quick example to give you a better understanding of how this works: You buy a property for $200,000. There are $10,000 in closing costs. You pay $5,000 in taxes which would otherwise be owed by the seller. Finally, you put $20,000 in for remodeling. That makes your total cost basis in the property $235,000.

If You Inherited Your Home

If you inherited a home from someone, the value of the home is considered to be whatever it was on the date of their passing. This is referred to as a step up in basis because you don’t have to worry about paying taxes on gains from all the way back to when they bought the property, but only on the value since it was inherited.

There’s some discussion in Congress of changing this through a revision to the tax code, so this may work differently in the future. Stay in touch with a tax expert.

If Your Home Was A Gift

When a home is a gift, the tax basis for the new owner is whatever it was for the previous owner, with some exceptions. Consult a tax expert. It can also trigger gift tax implications for the donor if the gift is big enough. You have to report any gifts over $15,000 to the IRS to go toward the lifetime gift and estate tax exclusion limit of $12,060,000 for individuals and $24,120,000 for couples in 2022.

How To Avoid Capital Gains Tax On Your Home Sale

If you meet eligibility criteria, you can exclude up to $250,000 ($500,000 if married filing jointly) from your taxable capital gains on a property. This exclusion can be taken advantage of more than once during your lifetime as long as it meets the appropriate criteria.

In order to qualify for the home sale exclusion, the home has to be your primary home. Your primary home is the one you lived in the majority of the time. It’s defined as the place where you receive utility bills or your location of residence on your state ID.

The house must also be the home that you own for at least 2 of the 5 years preceding the sale of the home. It’s important to note that the 2 years in which you own the home and the 2 years when it’s used as your primary residence does not need to be the same 2-year period. The catch to this is that you usually can’t exclude capital gains if you excluded gains on another home sale less than two years prior to your current sale.

Additionally, if you’re unable to physically or mentally care for yourself and spend time living in a care facility, that time can count toward your 2-year residency requirement as long as you spent at least 1 year actually living in your residence.

Finally, if you’re on qualified extended duty as a member of the uniformed services or U.S. intelligence community, your residency requirement may be suspended.

Notwithstanding the ownership and use rules, there may be circumstances in which you can qualify for a full or partial exclusion even if you don’t qualify under the rules. If the move was work-related or due to unforeseen circumstances, you’ll want to speak with a tax professional.

When you sell your home, you’ll receive a Form 1099-S. This will share your gross proceeds from the sale. Whether you have a taxable gain or not, you’ll use the information from this form to fill out Form 1040, Schedule D related to capital gains and losses. You’ll also fill out Form 8949.

How Much Capital Gains Do You Owe On Your Home Sale?

After figuring out your tax basis, you would subtract this from the profits to determine the amount you owe taxes on. Let’s say you have a $250,000 tax basis in a home you’ve owned for 5 years that sells for $350,000. You make $100,000 per year and file as single.

The formula is:

(Sale price Tax basis of home) × Applicable tax rate

If we plug in the numbers, we get:

($350,000 $250,000) × 0.15 = $15,000

This is the amount you could expect to pay if you didn’t qualify for exemptions which would fully or partially wipe this way.

Capital Gains On Home Sales: FAQs

Now that you know some about how it works, here are some frequently asked questions people have about capital gains tax on home sales.

Is there a capital gains tax on the sale of a second home?

The capital gains exclusion on home sales only applies if it’s your primary residence. In order to exclude gains on sale, you would have to sell your current primary home, make your vacation home your primary home and live there for at least 2 years prior to selling.

What if the property was purchased as an investment, not a residence?

If the property is a rental property that you’re not living in, it doesn’t qualify for the capital gains exclusion. However, if you have a multiunit primary property and you’re living in one unit, that does qualify.

Even with investment properties, there may be other tax advantages that you qualify for. You can use a 1031 exchange to defer taxes on capital gains from the sale of an investment property as long as those gains are put toward the purchase of another investment property. Additionally, you may be able to defer capital gains on property in opportunity zones. Talk to your tax advisor.

What if I lost money on the sale of a home?

While people generally don’t like losing money on a sale, any losses experienced from a capital investment can be used to offset capital gains and limit your tax liability. Speak to a tax professional.

Do I have to pay capital gains taxes if I’m getting divorced and transferring ownership to my spouse?

Generally, if you transfer your home to your spouse or ex-spouse, you’re not considered to have a gain or loss and it’s not a taxable event. The sole exception to this is if they’re a nonresident alien. If that’s the case, the tests laid out here will help you determine if you can exclude any gain.

The Bottom Line

If you’re preparing to sell your home, it’s important to consider the potential capital gains taxes on your home sale. Think about how long you’ve owned your home to determine which capital gains tax rates will apply to you. Should you be eligible for any exemptions, you may be able to avoid a hefty tax bill come tax season. Are you getting ready to move? Sell your house with Rocket HomesSM.

How can I avoid capital gains tax on my house?

How to avoid capital gains tax on a home sale.
Live in the house for at least two years. The two years don't need to be consecutive, but house-flippers should beware. ... .
See whether you qualify for an exception. ... .
Keep the receipts for your home improvements..

How long live in house avoid capital gains?

If you own and have lived in your home for two of the last five years, you can exclude up to $250,000 ($500,000 for married people filing jointly) of the gain from taxes. Adjustments to the cost basis can also help reduce the gain.

What is the capital gains exemption for 2022?

You may qualify for the 0% long-term capital gains rate for 2022 with taxable income of $41,675 or less for single filers and $83,350 or under for married couples filing jointly. You may be in the 0% tax bracket, even with six figures of joint income with a spouse, depending on taxable income.

How can I avoid capital gains tax on a second home?

Do a 1031 exchange and defer capital gains tax. Named for the IRS Code Section 1031, a “1031 exchange” — also called a “like-kind exchange” — allows you to swap out an investment home for another property of the same type without paying any capital gains tax.