This guide explains how the federal and Pennsylvania rules work. Your own numbers depend on your basis, your depreciation history, your income, and how you held the property, so a certified public accountant (CPA) or a tax attorney is the person to tell you what applies to your sale.

How capital gains and rental property fit together

When you sell a capital asset, “the difference between the adjusted basis in the asset and the amount you realized from the sale is a capital gain or a capital loss.” If you held the asset “for more than one year,” the gain or loss is generally long-term; if you held it one year or less, it is short-term, and net short-term gains are taxed “as ordinary income at graduated tax rates” (Internal Revenue Service).

A rental house adds a layer. Because you rented it out, you depreciated the building, and depreciation changes both your basis and how part of the gain is taxed. The IRS points rental owners to Publication 544 to “figure and report any gain or loss from the sale, exchange, or other disposition of your rental property” (Internal Revenue Service). Publication 544 explains the sale of depreciable property and Form 4797, Sales of Business Property (Internal Revenue Service).

What is your adjusted basis?

Your basis usually starts as what you paid for the property. For a rental, you then reduce it by the depreciation “you deducted or could have deducted on your tax returns” (Internal Revenue Service). Two points from Publication 527 matter most at sale time:

  • Missed depreciation still counts. “If you didn’t claim all the depreciation you were entitled to deduct, you must still reduce your basis in the property by the full amount of depreciation that you could have deducted.”
  • Only the building is depreciated. “Because land isn’t depreciable,” only the cost of the house goes into the basis for depreciation. Residential rental property placed in service under the general system is depreciated with “the straight line method over a recovery period of 27.5 years.”

If the house was your home before you rented it, the basis for depreciation is “the lesser of the FMV or adjusted basis on the date of conversion,” where FMV means fair market value (Internal Revenue Service).

Capital gains tax on rental property: the depreciation part

When you sell depreciable real property at a gain, “you may have to recognize all or part of the gain as ordinary income under the depreciation recapture rules. Any remaining gain is a section 1231 gain” (Internal Revenue Service).

Whether any of it is ordinary income depends on what the IRS calls “additional depreciation.” Publication 544 says there is no “additional depreciation” when the property “was residential rental property or nonresidential real property placed in service after 1986,” you held it longer than one year, and, if it was qualified property, you elected out of any special depreciation allowance. These properties are depreciated on the straight-line method.

The depreciation still shows up in the tax, as unrecaptured section 1250 gain: “Generally, this is the part of any long-term capital gain on section 1250 property (real property) that is due to depreciation” (Internal Revenue Service). The IRS taxes “the portion of any unrecaptured section 1250 gain from selling section 1250 real property” at “a maximum 25% rate” (Internal Revenue Service). It is figured with the Unrecaptured Section 1250 Gain Worksheet in the Instructions for Schedule D.

Capital gains tax rates the IRS states for 2025

The rest of a long-term gain is taxed at the capital gains rates. Topic 409 states the thresholds “for taxable years beginning in 2025.” They are shown here as the IRS states them for that year; check the IRS figures for the year you sell (Internal Revenue Service).

Filing status 0% rate if taxable income is up to 15% rate if taxable income is up to 20% rate
Single $48,350 $533,400 Above that
Married filing jointly, qualifying surviving spouse $96,700 $600,050 Above that
Married filing separately $48,350 $300,000 Above that
Head of household $64,750 $566,700 Above that

Net investment income tax (NIIT). A separate 3.8% tax applies to the lesser of your net investment income or the amount your modified adjusted gross income (MAGI) is over $200,000 for single or head of household filers, $250,000 for married filing jointly or a qualifying surviving spouse, and $125,000 for married filing separately. Net investment income generally includes rents and “net gains from the disposition of property such as … real estate,” unless the income comes from a trade or business to which the tax does not apply (Internal Revenue Service).

Suspended passive losses. If rental losses were held back in earlier years under the passive activity rules, selling can free them. For the losses to be allowed, “you must dispose of your entire interest in the activity in a transaction in which all realized gain or loss is recognized,” and the buyer “must not be related to you” (Internal Revenue Service).

Taxes on selling rental property in Pennsylvania

Pennsylvania’s personal income tax is “levied at the rate of 3.07 percent,” and “net gains or income from the dispositions of property” is one of the eight classes of income it taxes (Pennsylvania Department of Revenue). The Department of Revenue’s guide to that class adds three points that matter for landlords (Pennsylvania Department of Revenue):

  • Your Pennsylvania basis can differ. The guide says adjusted basis for business property is “often different for federal and Pennsylvania personal income tax purposes” and recommends separate Pennsylvania basis calculations.
  • Like-kind exchanges. “Effective January 1, 2023, the deferral of tax due on gains from like-kind exchanges of property are allowed,” using the definitions in section 1031.
  • The home exclusion has limits. Gain on the sale of a principal residence is generally exempt, but the exemption “does not apply to the portion of the property used for business or rental purposes,” such as “a duplex where one unit is rented.”

Ways the tax can be reduced or deferred

A like-kind (1031) exchange. “No gain or loss shall be recognized on the exchange of real property held for productive use in a trade or business or for investment” when it is exchanged “solely for real property of like kind” held the same way. The replacement must be identified “on or before the day which is 45 days after” you transfer the property you give up, and received by the earlier of 180 days or your return’s due date, with extensions (26 U.S.C. § 1031). If you also receive money or other property, you recognize gain to that extent, and “an exchange of real property held primarily for sale still does not qualify.” The exchange is reported on Form 8824 (Internal Revenue Service).

The home sale exclusion, for a rental you once lived in. You may exclude up to $250,000 of gain, or $500,000 for a married couple filing jointly, if you meet the ownership and residence tests: at least 24 months of each in the 5 years before the sale (Internal Revenue Service). Two limits apply to a former rental:

  • You “can’t exclude the part of your gain equal to any depreciation allowed or allowable as a deduction for periods after May 6, 1997.”
  • “Any period after 2008 during which the property isn’t used as a principal residence is, with certain exceptions, considered nonqualified use,” and the gain allocated to it may not be excluded. One exception: the time after you last lived in the home and before the sale is not counted as nonqualified use.

Publication 523 walks through both with worksheets. Our guide to whether to sell or rent out your house covers how renting first can change this.

Records to gather before you sell

Your tax preparer will need:

  • The closing statement from when you bought the property, and the split between land and building
  • Receipts for improvements, as opposed to repairs
  • Every year’s depreciation, from your returns or depreciation schedules
  • Any suspended passive losses carried forward
  • The settlement statement from the sale, once you have it
  • For Pennsylvania, any separate Pennsylvania basis records

Bring them to a CPA or tax attorney before you sign an agreement of sale, especially if you are considering a 1031 exchange, because its 45-day clock starts when you transfer the property.

Selling a rental in Pittsburgh

If you are weighing how to sell a rental with tenants in it, our hub on selling a rental property with tenants covers the leases, the deposits, and the options, and our guide to tenants rights when a landlord sells in PA covers the tenants’ side. A buyer who pays cash changes the timeline, not the tax rules above.