How to Calculate Capital Gain on a Rental Property

To calculate gain on a rental property, subtract your adjusted basis from the amount realized on the sale. For an ordinary sale, work out these two numbers first:
- Amount realized: The sale price minus qualifying selling expenses.
- Adjusted basis: For a property you bought, your cost plus qualifying acquisition costs and capital improvements, minus depreciation allowed or allowable and other required adjustments.
Depreciation is the deduction for the cost of a rental building and other depreciable property over time. It lowers your basis, so subtracting only the original purchase price can understate your gain.
The example below puts the numbers together. Calculating the tax comes afterward because different parts of the gain can be taxed differently.
Rental Property Capital Gain Calculation: A Worked Example
Suppose your purchase and sale have these figures:
- Original cost: $280,000.
- Qualifying capital improvements: $35,000.
- Sale price: $550,000.
- Qualifying selling expenses: $33,000.
For this hypothetical example, assume the depreciation schedules show $137,455 of total depreciation allowed or allowable for the building and those improvements combined. That is an assumed input, not a depreciation schedule calculated from the purchase price. Assume no other basis adjustments.
Worked example: calculate the gain in three steps
- Find adjusted basis. $280,000 original cost + $35,000 improvements − $137,455 depreciation = $177,545.
- Find amount realized. $550,000 sale price − $33,000 selling expenses = $517,000.
- Subtract basis from amount realized. $517,000 − $177,545 = $339,455 gain.
The gain is $339,455, not the final tax bill. For your property, use actual depreciation schedules, including separate improvements and their placed-in-service dates. Then classify the gain before applying federal and California tax rules.
Does paying off the mortgage reduce the gain?
Paying off the mortgage reduces the cash you receive, but the loan principal payoff is not another deduction from the gain.
Keep cash proceeds separate from taxable gain
If $200,000 of mortgage principal were paid from this example’s $517,000 after selling expenses:
- Cash left before taxes and other closing adjustments: $517,000 − $200,000 = $317,000.
- Gain on the property: Still $339,455.
Do not subtract selling expenses again; they are already included in the $517,000.
The Numbers That Go Into the Calculation
Start with the original cost allocated between land and depreciable improvements. Add qualifying acquisition costs and capital improvements, then subtract depreciation and other required reductions.
If you inherited the property, received it as a gift or acquired it through an exchange, do not assume the previous owner’s purchase price is your starting basis. A home converted to rental use can also have different basis rules for depreciation, gain and loss. Give your preparer the acquisition and use history before applying the example.
Gather the records behind the numbers
- Purchase records: The original settlement statement and support for the land/building allocation.
- Depreciation schedules: The building and separate improvements, with their dates first available for rental use.
- Improvement records: Invoices and evidence of what was done and when it was placed in service.
- Other adjustments: Casualty losses, insurance reimbursements and any prior Form 3115 accounting-method adjustments.
- Sale records: The closing statement and qualifying selling expenses.
A remembered project is not enough to establish a basis adjustment. Use the records to distinguish capital improvements from repairs already deducted.
Amount realized is not always the cash wire. It generally includes money, the fair market value of other property received and liabilities the buyer assumes, less qualifying selling expenses.
If an assumed mortgage is already included in the total sale price, do not add it again. IRS Publication 544 explains these rules.
Two properties with the same purchase and sale prices can have different gains because their improvements, depreciation and selling expenses differ.
How Depreciation Lowers Your Adjusted Basis
Land is not depreciable. When a purchase includes land and buildings, allocate the cost using their relative fair market values when acquired. There is no dependable statewide land percentage.
If you are not certain of the separate fair market values, IRS Publication 551 permits allocation based on assessed values. Document the method; an acquisition-date appraisal may provide better support when assessments do not reflect relative market values.
Residential rental buildings under the usual general depreciation system are generally depreciated over 27.5 years. The mid-month convention adjusts the deduction for the months the building enters and leaves service. Land is excluded.
A simplified depreciation illustration
- One full-year equivalent: $160,000 building basis ÷ 27.5 years ≈ $5,818.
- Twenty full-year equivalents: $160,000 ÷ 27.5 × 20 ≈ $116,364.
This illustrates the relationship, not an actual schedule. Your calculation must use the applicable method, convention, dates, improvements and prior returns.
A later improvement generally has its own depreciable basis and placed-in-service date. Adding its cost to basis without subtracting its depreciation can overstate basis and understate gain. IRS Publication 527 explains rental depreciation.
Skipping a depreciation deduction does not normally preserve your basis. The adjustment includes depreciation allowed or allowable: what you deducted or were entitled to deduct. Ask your tax preparer how to correct missing depreciation rather than simply leaving it out of the sale calculation.
Depreciation Recapture and Federal Capital-Gain Rates
Do not apply one long-term capital-gain rate to the entire difference between purchase price and sale price. For a typical residential rental held more than a year, separate these categories:
- Depreciation-related gain: With straight-line depreciation, this is generally unrecaptured Section 1250 gain, subject to a maximum 25% federal rate. That is a ceiling, not an automatic 25% tax; the category cannot exceed the applicable recognized gain.
- Other gain: It may receive lower long-term capital-gain rates under the Section 1231 rules for business-property sales. Prior losses can change that result.
- Ordinary-income recapture: Certain property components or depreciation methods can produce this different treatment. It is not interchangeable with unrecaptured Section 1250 gain.
IRS Topic 409 explains the different capital-gain rates. If you deducted net Section 1231 losses during the previous five years, some current gain may be taxed as ordinary income instead; give your preparer those prior returns.
2026 general long-term capital-gain bands
- Single: 0% through $49,450 of taxable income; 15% above that through $545,500; 20% above $545,500.
- Married filing jointly: 0% through $98,900; 15% above that through $613,700; 20% above $613,700.
These are taxable-income bands, not separate allowances for the sale. Other taxable income uses up room in the bands, so different portions of gain can fall at different rates. The depreciation-related category retains its separate maximum 25% rule.
Source: IRS Revenue Procedure 2025-32, section 4.03. Other filing statuses have different thresholds.
When the additional 3.8% federal tax may apply
The net investment income tax, or NIIT, is 3.8% of the lesser of your net investment income or the amount your modified adjusted gross income exceeds the applicable threshold:
- Single or head of household: $200,000.
- Married filing jointly: $250,000.
- Married filing separately: $125,000.
Whether your rental gain is included depends on your participation and the applicable business rules, as well as the gain and other income. IRS Topic 559 explains the calculation. Do not automatically add 3.8% to the entire sale price or gain.
What if the rental used to be your main home?
Give your preparer the dates you bought the property, lived there, moved out and rented it. The home-sale exclusion generally requires ownership and main-home use for at least two of the five years before sale, with separate tests and exceptions. Simply owning a rental does not qualify.
IRS Publication 523 also requires checking prior exclusions, nonqualified use and depreciation that cannot be excluded.
The order of home and rental use matters
- Renting after moving out: Time after your last main-home use is generally excluded from nonqualified use when it falls within the five years ending on the sale date. You still need to meet the other exclusion requirements.
- Renting before moving in: Rental periods after 2008 may count as nonqualified use, making part of the gain ineligible for exclusion even if you later meet the ownership-and-use tests.
- Depreciation: Gain attributable to depreciation allowed or allowable after May 6, 1997, cannot be excluded under the home-sale rule.
Do not simply divide rental years by total ownership years to estimate the taxable share. The dates, sequence and exceptions change the calculation.
California’s Additional Layer
California does not provide a separate lower long-term capital-gain rate. Taxable gain is included in state taxable income. Your actual tax depends on the complete California return, including any California basis differences and available losses.
The California Franchise Tax Board explains this treatment. Include the state calculation when comparing sale years or offers.
Which Tax Forms Report a Rental Property Sale?
A depreciable rental-property sale generally starts with Form 4797, not a calculation copied from the closing statement.
- Form 4797: Reports the business-property disposition and determines Section 1231 and ordinary-recapture treatment.
- Schedule D and its worksheets: Handle applicable long-term and unrecaptured Section 1250 gain calculations flowing from that process.
- Other forms when applicable: Form 8960 for NIIT, Form 8824 for a like-kind exchange or Form 6252 for an installment sale.
Form 8949 generally reports capital-asset transactions such as securities, rather than the depreciable rental-real-estate sale reported through Form 4797. Your preparer needs the property’s use and depreciation history to select the correct reporting.
Remember losses carried forward from earlier returns
Suspended passive losses are rental losses you were not yet allowed to deduct. They are separate from the property’s gain calculation but may reduce taxable income on a qualifying disposition.
The general release rule applies when you sell your entire interest in the activity in a fully taxable transaction to an unrelated person. Grouped activities, installment sales and at-risk limits need separate review. Bring the carryforward schedules; IRS Publication 925 explains the rules.
Options to Consider Before You Close
1031 exchange
A properly structured Section 1031 exchange can defer eligible gain when qualifying investment or business real property is exchanged for qualifying replacement real property. It is a deferral, not a permanent exclusion. Cash or other non-like-kind property can trigger current gain.
- Arrange it before closing. Avoid actual or constructive receipt of the proceeds. A qualified intermediary is a common safe-harbor structure; put the intermediary and exchange documents in place before the property you are selling closes.
- Identify replacement property within 45 days after transferring the old property, following the written-identification requirements.
- Receive the replacement by the earlier deadline: 180 days after the transfer or the due date, including extensions, of your tax return for the sale year.
Report the exchange on Form 8824. Have the exchange and tax professionals check eligibility and the full structure before you commit.
Installment sale
An installment sale can spread recognition of eligible gain across years as you receive principal payments. It does not defer every component:
- Interest: Taxed as ordinary income.
- Ordinary-income depreciation recapture: Generally reported in the year of sale, even if payments come later.
- Eligibility limits: Related-party and dealer rules can restrict installment treatment.
Unrecaptured Section 1250 gain is not automatically all ordinary recapture due in the first year. IRS Publication 537 explains installment treatment.
The practical tradeoff is credit risk: you are carrying the note and relying on the buyer to keep paying. That is a different decision from receiving the sale proceeds at closing.
Our guide to selling a rental property in Southern California covers tenant, condition and escrow decisions alongside the tax planning. If amount realized is below adjusted basis, see the separate rules in selling a rental property at a loss.
Calculating Capital Gain on a Rental Property: Common Questions
How do you calculate capital gain on a rental property?
Subtract adjusted basis from amount realized. In an ordinary sale, that means sale price minus qualifying selling expenses, minus your basis after improvements, depreciation and other required adjustments. Subtract each expense only once. This gives the gain, not the tax bill.
How is depreciation-related gain taxed?
For a typical long-held residential rental depreciated straight-line, the depreciation-related portion is generally unrecaptured Section 1250 gain with a maximum federal rate of 25%. It is not automatically taxed at 25% or treated as ordinary recapture. Other components or methods can produce ordinary recapture.
How is a rental sale taxed in California?
California taxes capital gain without a preferential long-term rate. The tax depends on your complete state taxable-income calculation, including California basis adjustments and available losses.
Can I avoid capital gains tax with a 1031 exchange?
A qualifying exchange can defer eligible gain, not permanently erase it. Arrange the structure before closing, identify replacement property within 45 days and receive it by the earlier of 180 days or the applicable return due date, including extensions. Cash received can create current taxable gain.
Which tax forms report a rental property sale?
A rental sale generally runs through Form 4797, with applicable results carried into Schedule D and its worksheets. Exchanges, installment sales and NIIT may require additional forms. The closing statement alone does not establish the tax treatment.
Talk to a CPA Before You Commit to Any Timeline
Before choosing a price or closing year, ask your CPA or enrolled agent for two separate estimates:
- The property’s gain: Based on actual basis, depreciation and selling expenses.
- The effect on your whole return: Federal and California tax, possible NIIT and usable losses, so you can estimate what remains after taxes, transaction costs and loan payoff.
This is general information, not individualized tax advice. A buyer’s net sheet is a starting point for the discussion, not a tax estimate. Bring the records listed above and your passive-loss carryforwards, even if the sale has already closed.
A below-market sale to a family member can trigger separate bargain-sale, gift, basis and related-party rules. Our breakdown of tax implications when selling below market value covers those differences.
I’m Doug Van Soest. My wife, Andrea Van Soest, CA DRE #01505854, and I have been buying rental properties directly from landlords across Southern California since 2008.
We buy properties for cash, so we have a commercial interest in a direct sale. Compare our offer with your other selling options and have your own tax adviser review the numbers.
Together, Andrea and I have closed over 400 transactions across Southern California, including rentals in Riverside, Orange County, San Diego, Los Angeles and San Bernardino counties.
If you want a written offer and a net sheet to take to your CPA, reach us at (951) 331-3844 or through the cash offer page.
