It is often said that buying a house is the largest purchase you will make in your life. If you’re not careful, though, that house can also create one of the largest tax bills you will pay in your life.

There are usually a million things going through your head when you buy a house: Can I get financing? Does this house have an H.O.A.? Is this a good neighborhood? What about the schools? And so on.

If you’re like most people, minimizing your potential capital gains tax is not one of those million things… that is, until the time comes to sell your house. Fear not. What an appreciating real estate market giveth, the taxman need not taketh away.

Capital Gains Tax

Generally speaking, taxes on capital gains are triggered when a person sells an appreciated asset. Stocks are a great example of this. Capital gains come in two main flavors, short-term (property held less than 12 months) and long-term (property held longer than 12 months). For most people, selling their house has the potential to trigger long-term capital gains tax.

A person’s long-term capital gains tax rate is determined by their marginal tax rate on ordinary income- aka the rate most people think of as “their tax rate.” Currently, 20% is the top federal income tax rate on long-term capital gains*. This rate only applies to those people (un)lucky enough to be in the 39.6% marginal tax bracket.

For most people, (those making between $41,676 – $459,750 as an individual, or $83,351 – $517,200 married couple filing jointly in 2022) the federal long-term capital gains rate will be 15%. While 15% may not seem like a lot when you’re leaving your server a tip after a nice meal, 15% of several hundred thousand dollars adds up very quickly.

Capital gains tax, as you might imagine, is a tax on any gain earned from the sale of property. For tax purposes, the gain is calculated by subtracting the property’s basis from the sale price (fair market value). Most of the time, a person’s basis in their house is the same as the price they paid when they bought the house. For example, Able purchased a house in 2018 for $150,000. Ables basis in the house is $150,000. When Able sells the house in 2021 for $210,000, he has a gain of $60,000.

Exclusion for Sale of Primary Residence

In one of its more generous provisions, the tax code provides for a potentially huge tax break when selling your personal home. According to IRS Publication 523 (IRS Pubs are always a good read if you can’t sleep):

The tax code recognizes the importance of homeownership by providing certain tax breaks when you sell your home.

Those tax breaks come in the form of an exclusion of up to $250,000 of gain for an individual, $500,000 for those married filing jointly. However, those exclusions are not automatic. In order to qualify for the full $250,000 or $500,000, your home must pass the eligibility test, which is essentially this:

  • You must have owned the house for at least two years
  • The house must be your primary residence
  • You must have lived in the house for two of the past five years.

This exclusion is very substantial, and for most people, married couples especially, this exclusion alone can completely negate any potential capital gains tax when selling a house that meets the criteria.

In fact, some real estate investors use this exclusion regularly to avoid capital gains tax. People who buy and fix homes to sell (sometimes known as flippers) use this tactic to make essentially tax-free income, but you can only claim the exclusion once in any two-year period.

So long as the investor meets the other criteria for the exclusion, they purchase and occupy a house as their primary residence while fixing it up for sale, live in the house for two years, sell the house, claim the exclusion, and repeat.

Keep Track of Home Improvements (and Keep the Receipts)

One of the realities of homeownership is the seemingly constant need for maintenance and upkeep. While money expended for those purposes does not have any benefit from a capital gains tax perspective, money expended on home improvements does.

Money spent on home improvements, such as a kitchen remodel, room addition, roof replacement, and so on, can reduce capital gains tax because the cost of said improvements gets added to the property’s basis.

Take our same example of Able, above. In this case, Able remodels his master and guest bathrooms in 2019, at a cost of $20,000, and builds a deck onto the back of his house in 2020 for a cost of $10,000. In this case, Able adds the $30,000 of improvements to his basis (now at $180,000). Now, when he sells the house in 2022 for $210,000, he has a lower gain of $30,000 and thus, a lower potential capital gains tax.

Estate Planning and Capital Gains

Even if you plan to live in your house for the rest of your life, you should take capital gains tax into account. The reality, in most cases, is that after you pass on, your house will be sold at some point. By taking simple steps, you can reduce or eliminate the capital gains tax your heirs will have to pay.

When a person inherits real property, that property generally gets what is known as a stepped-up basis. According to the tax code, property acquired by bequest, device, or inheritance, or by the decedent’s estate from the decedent is entitled to a stepped-up basis.

Essentially, the beneficiary’s basis in the property gets stepped up from the now-deceased owner’s basis to the current fair market value of the house. For example: rather than selling his house, our friend Able passes away in 2016, and leaves his house to his daughter, Beth. In this case, Beth’s stepped-up basis in the house would be the fair market value of $210,000. If Beth then immediately sells the house at that price, she would have no gain, and thus, pay no capital gains tax.

Hold Title to Your House Appropriately

In the case of a married couple, the heirs of the surviving spouse can get a double step-up in basis, if the title to the house is held in a certain way.

Broadly speaking, and without getting to state-specific laws regarding community property: when a house is held by a married couple as joint tenants and one spouse passes away, the surviving spouse gets 100% ownership of the house and a stepped-up basis (as described above).

Then, when the surviving spouse leaves the house to their heir, the heir will receive a second step-up in basis. Assuming that the house continues to appreciate in value after the first spouse’s death, the second step-up in basis can create significant tax savings.

When inheriting a house, capital gains tax issues will likely be one of the furthest things from the mind of the beneficiary. An inheritance is necessarily preceded by someone passing and in those situations, emotional concerns may take precedent over financial ones. That being said, a bit of planning and forethought will go a long way in helping things along when it comes time to address financial matters.

*It is also worth noting that most states also have a state-level capital gains tax. The exact percentage will vary from state to state. For example, we Californians have the dubious distinction of being subject to the highest state capital gains tax rate at 13%, bringing the total top capital gains rate for Californians to 33%!


  • Evan Gautier

    Evan is an attorney licensed in California and Oregon. Though his legal practice is mainly focused on civil litigation, Evan has a passion for tax, retirement planning, and personal finance. When not in court or at the office, Evan can be found hiking around Southern California or tending his suburban backyard farm with his wife and daughter. Evan earned his J.D. from Western State College of Law, and an LL.M. in Taxation from Chapman University.