This article explains how a capital gain taken on the sale of real estate is taxed differently than ordinary income. It also covers how capital gains works in tandem with the principal residence profit exclusion.

An agent’s advice on the tax aspects of a sale

Property owners considering the sale of a property are often somewhat averse to selling for fear of an uncertainty haunting them — tax consequences, a readily knowable profit tax liability incurred in the year a sale is closed unless exempt, excluded or deferred.

To neutralize this fear, the agent representing a seller analyzes and advises on the approximate amount of profit taken and any income taxes they will incur on the sale as part of the real estate services they render. Also, taxes are personal to the seller. Thus, the agent’s tax information brings to light the scope of the agent’s real estate knowledge, strengthening the seller’s bond with the agent.

Further, the compelling basis for a tax advisory approach with clients is that taxes are an inherent part of every real estate sales transaction the agent negotiates. The advice also informs the client about alternative decisions available to them. More mundane but critical, giving advice on tax aspects is accounting taught as part of the real estate education legislated for licensees.

To discuss the tax aspects of a sale with anyone, real estate licensees need sufficient expertise to understand and determine the likely profit tax their seller incurs on the transaction they are negotiating. Also, licensees have good reason to develop their working knowledge about tax ramifications to best:

  • prepare agreements for clients;
  • review financial aspects of a sale; and
  • discuss issues with the client’s other advisors; or
  • when acting solely as a principal for their own account.

Related article:

The truth about giving tax advice to clients


Profits as capital and recaptured gains

All property acquired is given a cost basis account for tax reporting. The cost basis initially established for a property is its cost of acquisition. For an investment or business-use property, a portion of the price is allocated to improvements and annually depreciated.

Depreciation allows the owner to recover the capital invested in the property by a deduction from rental income to set up a tax-free recovery. 

As a deduction, the cost basis for a property is adjusted downward by the amount of the annual depreciation allowance. In contrast, a homeowner occupying the property — a capital asset — does not depreciate the property. A home the owner occupies is for personal use, not investment or business purposes.

When an improved property held for investment or business use has reported depreciation and is later sold, the cost basis amount remaining is deducted from the net sales price to determine the total profit on the sale. For the profit to be taxed, it is broken down into two types of gains:

  1. The amount of depreciation taken during ownership is called unrecaptured gains and taxed up to the maximum rate of 25%; [IRC §1(h)(1)(E); see RPI Form 351 5.3] and
  2. the profit remaining is the portion of net sales proceeds exceeding the price paid for the property which is called capital gains and taxed at a single rate of either 0%, 15% or 20%, the rate determined by the amount of the seller’s taxable income. [IRC §1(h)(1)(C)-(D); See RPI Form 351 5.4]

Again, a capital gain is the amount of the net sale price exceeding the price originally paid for the property and cost of additional improvements. Capital gains are of two types:

  • short-term gains, produced on a sale of a capital asset closed within one year after purchase, and taxed as ordinary income; or
  • long-term gains, taken on a sale closed after a one-year holding period, and taxed at the capital gains rate.

Editor’s note — Capital assets include real estate:

  • actively operated as a gross-lease rental property investment, a passive income category property;
  • held as a management-free, net-lease investment for income or profit, a portfolio income category property; and
  • the owner’s principal residence, a portfolio category property. [Internal Revenue Code §1221]

Capital assets do not include trade or business use assets or inventory. Property classified as a trade or business use asset, and subject to capital gain tax rates, includes real estate:

  • used to house or facilitate the operation of a trade or business;
  • qualified for depreciation when improved; and
  • owned for more than one year.

Related article:

Brokerage Reminder: Tax treatment of a real estate investment – income or profit?


The tax rate selection for capital gains

The long-term capital gain — the profit taken as the dollar increase in the sales price of the property over the original cost of acquisition and improvements — is taxed at either 0%, 15% or 20% long-term capital gains tax rates. The single rate is applied to all the profit, and is selected based on the amount of the owner’s taxable income reported for the year of sale.

For taxable years 2022 and 2023, the tax rate applied to capital gains for joint filers is determined based on their taxable income:

2022 taxable incomeUp to $83,350$83,351 – $517,200Over $517,200
2023 taxable incomeUp to $89,250$89,251 – $553,850Over $553,850

In comparison, regular income is taxed at a higher rate across income brackets with graduated tax rates. Thus, an individual who earns most of their income in a year through the profitable sale of investments — capital gains — is privy to a lower tax rate on their income than someone whose income was earned through a regular 9-5 job.

Further, when the resale price is less than the price paid to acquire the property and make improvements (no capital gain is realized), the depreciation deductions taken during ownership while taxed as unrecaptured gain, limited to the net resale price minus the remaining cost basis.

Typically, the capital gain amount on a sale is not all taxed, due to a process called batching. This results in only a portion of the capital gains being taxed due to the priority treatment of first taxing ordinary income, then any unrecaptured gains, and any remaining taxable income taxed at the capital gains rate. [See RPI ebook: Tax Benefits of Ownership: Chapter 12]

Related form:

Using the INTAX form to calculate the seller’s federal tax liability on a real estate sale

Principal residence profit exclusion to induce homeownership

Profit is taxed — unless exempt, excluded, deferred, or reduced by offsets for losses and deductions.

Profit on a sale of the seller’s personal residence qualifies for the §121 principal residence profit exclusion when the seller has:

  • owned the property for at least five years; and
  • occupied the property as their principal residence for at least two years during the five-year period prior to closing the sale. [IRC §§121(a)]

For example, consider a homeowner and spouse who paid $250,000 for their principal residence which they are now offering for sale at a net sales price of $900,000.

The homeowners occupied the property as their principal residence during the entire period of their ownership, meeting the two or prior five years occupancy-ownership qualification measure. Further, they did not take any depreciation deductions on the residence as a home office or as a rental, in whole or in part. Thus, their cost basis remains unchanged as the price they originally paid for the residence and additional improvements.

On the sale, they will take a profit of $650,000 since a principal residence is a capital asset. They qualify for a combined exclusion from profit tax of $500,000. Thus, they will report and be taxed on a profit of $150,000 – a portfolio income category profit which in combined into their adjusted gross income (AGI). After personal deductions, the taxable profit becomes part of the homeowner’s taxable income, estimated to be at $400,000 for the year of sale.

Further, the $150,000 in profit remaining (after taking their principal residence profit exclusion) will be reported as a long-term capital gain and taxed as remaining taxable income at the 15% rate after all other income is batched and taxed. Their maximum tax liability on the sale of the residence is $22,500 — as the 15% capital gain rates is selected based on the amount of their taxable income. [See Form 351 §5.4]

Related article:

Top 10 tax scams to avoid during the recession


Partial occupancy rules

Often, a homeowner occupies a home they own as their principal residence for less than their entire period of ownership. Tax-wise, the profit taken on the home is allocated to the years they occupied the home under an occupancy-ownership ratio.

In contrast, the $250,000/$500,000 exclusion remains unaltered. What is altered is the amount of profit on the sale which is available for the residence profit exclusion.

The total profit on a sale subject to the occupancy-ownership ratio is allocated pro rata to all years of ownership. In turn, the sum of the profits allocated to the years of occupancy is the portion of the profit qualifying for the exclusion.

Periods of ownership considered to have been occupied by the owner as their principal residence include:

  • any period of ownership prior to January 1, 2009; [IRC §121(b)(5)(C)]
  • any period of use as the owner’s principal residence after January 1, 2009 prior to the sale; and
  • any period after terminating their use of the property as a principal residence within five years prior to the sale. [IRC §121(b)(5)(C)(ii)]

Related article:

How indexing capital gains to inflation would impact California’s housing market


Calculating occupancy/ownership profit ratio

Consider an individual owner who purchases a property on January 1, 2003, for use as a second home.

On January 1, 2019, they occupy it as a principal residence

The individual moves out on January 1, 2021, terminating their use of the property as their principal residence.

The owner closes a sales escrow disposing of the property on January 1, 2023, taking a $300,000 profit.

How much of the $300,000 in profit can the individual owner exclude under the occupancy-to-ownership ratio since they did not continuously occupy the property during their twenty years of ownership?

On analysis, the owner meets the initial two-out-of-five-year principal residence requirement for use of the exclusion. During the twenty years of ownership, the period of occupancy as the owner’s principal residence is ten years, based on:

  • the six years prior to January 1, 2009, even though they did not occupy the property during that time;
  • the two years after January 1, 2009 when they actually occupied the property as their principal residence; and
  • the two years after terminating their occupancy of the property as their principal residence up to the closing of the sale, even though they did not then occupy the property.

Thus, the occupancy-to-ownership ratio is 10:20, representing the ten years of occupancy over the twenty years of ownership. Here, 1:2 (50%) of the $300,000 profit on the sale is $150,000, the portion of the profit to which the exclusion applies.

As the exclusion ceiling amount of $250,000 is available to the individual owner, the occupancy-to-ownership ratio portion of the profit available — $150,000 — is fully excludable from the owner’s gross income. [IRC §121(b)(1)]

Related article:

The principal residence profit exclusion, explained


Meeting the threshold for tax-free profit

At times, individuals or couples sell due to personal difficulties but do not meet the two-out-of-five-year ownership and occupancy requirement needed to claim the full amount of the profit exclusion.

When personal difficulties bring about the decision to sell, closing the sale before two years of owner-occupancy, the homeowner qualifies for a prorate share of the $250,000/$500,000 profit exclusion as a partial exclusion.

The partial exclusion allows a homeowner to exclude from taxes all profit on the sale up to a prorated portion of the $250,000/$500,000 profit exclusion.

The ceiling amount for partial exclusion is set by a ratio based on the fraction of the two years they were owner-occupants of the residence.

Importantly, the proration is a reduction of the $250,000/$500,000 exclusion ceiling. It is not a reduction in the profit taken on a sale that is available for exclusion.

To qualify for a partial exclusion, a change in circumstance due to personal difficulties needs to be the primary reason for sale of the property. Qualifying personal difficulties include:

  • a change in employment, based on the seller’s occupancy of the residence at the time of the job relocation and the financial need to relocate for the employment;
  • a change in health, such as advanced age-related infirmities, severe allergies, or emotional problems; or
  • unforeseen circumstances, such as natural or man-made disasters, death or divorce. [IRC §121(c)(2)(B); Revenue Regulations §1.121-3]

Thus, when a homeowner sells due to personal difficulties, all profit taken on the sale is excluded from taxation up to the ceiling amount of the partial exclusion. [IRC §121(c)(1)]

The amount of profit taken — realized — on a sale of real estate is set by subtracting the property’s cost basis from the net sales price they receive on its sale.

Consider an individual who owns and occupies a property as their principal residence for no more than 23 months before closing a sale of the residence at a profit. No personal difficulties triggered their need to sell the property.

Does the individual qualify for the profit exclusion?

No! The individual did not occupy the property for a total of two of the five years preceding the sale and no personal difficulties existed to shorten the qualifying time. [IRC §121(a)]

Unoccupied at time of sale

An individual or married couple need not occupy a property as a principal residence when they purchase the property or when they sell it to qualify for the $250,000 or combined $500,000 profit exclusion.

Consider a married couple who acquires a property and occupies it continuously as their principal residence for over two years

Later, the couple buys another home and moves in, occupying it as their principal residence. The couple rents the old residence to a tenant, converting it into a rental property, and takes their annual depreciation allowance deduction.

Within three years of moving out of their prior residence, the couple sells it and closes a sale, taking a profit as the difference between its adjusted cost basis and net sales price. The profit here consists of capital gain (net resale price less price paid to acquire) and unrecaptured gain (depreciation deductions during rental period). The couple files a joint tax return for the year of the sale.

Here, the couple qualifies for the $500,000 profit exclusion even though they did not occupy the property at the time of the sale. The couple owned and occupied the prior residence as their principal residence for at least two of the last five years. However, the amount of recaptured gain due to depreciating the property during the period it was rented is taxed on the sale as recaptured gain at up to a maximum rate of 25%.

Related article:

Tax Benefits of Ownership: The Mortgage Interest Deduction


Want to learn more about how real estate income is taxed? Check out the RPI ebook: Tax Benefits of Ownership.