Selling a piece of real estate can be exciting, but it can also lead to a big bill from the taxman in some situations. When you sell real estate, the sale may be subject to capital gains taxes. Understanding how capital gains taxes work can help you plan the sale in the appropriate way so that you can avoid or minimize these taxes.

Capital Gains Explained

So what are capital gains taxes? This is a type of tax that is charged on the amount of gain that you earned on an asset. In the case of real estate, you’re essentially paying tax on the difference between what you bought the property for and what you sell it for. When calculating capital gains, you have to go by the cost basis. This means that you have to add in the transaction costs on the sale and any improvements that you made to the property while you owned it.

Homeowners Exclusion

If you live in a house as your primary residence, the Internal Revenue Service gives you a major break when it comes to paying capital gains taxes. The homeowners exclusion allows you to completely skip out on the capital gains tax bill as long as the sale meets some specific conditions. You must live in the house for at least two years. This is determined by looking at the last five years. You also have to be living in the house at the time of the sale. If you meet those qualifications, you can exclude up to $250,000 of capital gains as an individual. If you’re married, that amount doubles to $500,000. This means that the vast majority of people who sell their primary homes don’t have to worry about capital gains taxes.

Investment Property

If you sell a rental house or some other kind of investment property, you don’t get the homeowner’s exclusion. This means that you will have to pay capital gains taxes on the property. If you held the property for longer than a year, the capital gain is taxed at a lower capital gains tax rate. When you sell the house after owning it for less than year, you pay the short-term capital gains tax rate, which is equal to your regular marginal tax rate. This means that if you’re an investor, you can save some money by waiting at least a year to sell your property.