Baker 1031Investor Workspace
Welcome, there!Log Out

Learn

A little clarity for your next decision.

Loading your learning library…

Browse the library

Baker 1031

Investor workspace · Airtable inventory

Capital Gains Tax on Real Estate: How to Calculate Gain and Plan a Sale

By Jerry Baker

Capital gains tax on real estate starts with the difference between what you receive from a sale and your adjusted tax basis. The final tax also depends on how you used the property, depreciation, the holding period, other income, and any exclusion or deferral that applies. This guide shows how to organize those pieces before deciding whether to sell, hold, or explore a 1031 exchange.

Start with the gain, not the sale price

A million-dollar sale does not automatically create a million-dollar gain. You need a second number: adjusted basis. Section 1001 provides the federal gain framework, using amount realized less the adjusted basis that applies to the transaction. [1]

Amount realized can include money and the value of other property received. Debt and closing adjustments may also matter. Have your preparer reconcile the whole deal rather than use only the wire that reaches your bank.

I would separate the discussion into three questions. What gain did the transaction produce? How much must be recognized now? How is that recognized gain taxed? Answering them in that order avoids a lot of confusion.

For example, a qualifying exchange can produce realized gain while deferring some or all of its recognition. A qualifying home sale may exclude some gain. Those results arise from specific rules, not from changing the property's sale price.

Identify the use and the taxpayer

“Real estate” describes the asset, but it does not settle its tax category. Your main home, a rental, investment land, and property held mainly for sale to customers can have different treatment. [2]

Starting questionInformation to bringWhat the answer helps determine
Who owns and sells it?Deed, entity documents, prior returnsWhich taxpayer reports the transaction
How was it used?Rental and personal-use timelineApplicable gain and exclusion rules
How was it acquired?Purchase, gift, estate, or exchange recordsStarting basis and holding history
What is included?Asset list and contract allocationSeparate land, building, and equipment treatment

Do this before transferring title or signing a sale contract. A last-minute ownership change can create questions that did not exist when the planning began.

Each owner also needs the right share of the numbers. If relatives own a property together, do not assume that every person's basis, losses, or tax result is identical simply because they share one closing.

Build the basis from its history

Basis is your tax investment in an asset. For a purchased property, the starting point generally includes cost, including qualifying acquisition costs. Other ways of acquiring property require other rules. IRS Publication 551 explains these starting points. [3]

A down payment is not the full cost. Buying a $900,000 property with $300,000 cash and $600,000 debt does not generally make the starting purchase-price basis only $300,000.

Next, account for adjustments. Qualifying capital improvements can add basis. Depreciation and other required reductions can lower it. Section 1016 provides the adjustment rules, including the allowed-or-allowable depreciation principle. [4]

Bring invoices and prior schedules instead of a list of remembered projects. A current repair deduction should not also become a basis addition. The same roof should not be counted twice because it appears in both a project spreadsheet and the depreciation records.

Ask the CPA to label confirmed amounts, estimates, and open questions. If a large improvement has no supporting record yet, show how resolving it would change the estimate.

A complete starting example

Consider an original hypothetical rental-property sale. An individual paid $900,000, later added $150,000 of qualifying capital improvements, and has $280,000 of allowed-or-allowable depreciation through sale. Assume no other basis adjustments.

The property sells for $1,650,000. Assume $90,000 of costs properly reduce amount realized. The transaction does not qualify for an exclusion or deferral. The mortgage payoff is $550,000.

MeasureCalculationResult
Adjusted basis$900,000 + $150,000 − $280,000$770,000
Net amount realized$1,650,000 − $90,000$1,560,000
Realized gain$1,560,000 − $770,000$790,000
Cash before personal tax$1,560,000 − $550,000$1,010,000

There are two different useful answers: $790,000 of gain and $1,010,000 of cash before tax. The mortgage payoff reduces cash. It does not become a second deduction from gain.

This is only the starting computation. The CPA still needs to allocate values among the assets, classify the gain, and apply the owner's full-year tax rules. The table is not a completed return or a prediction of anyone's tax bill.

See what changes when the price changes

Keep that example's basis, sale costs, and debt fixed, but reduce the price by $100,000. Net amount realized falls to $1,460,000, gain falls to $690,000, and cash before tax falls to $910,000.

That is a simple sensitivity check. In a real sale, some expenses might change with price. A commission calculated as a percentage should be recalculated. A fixed legal fee might stay the same.

Now return to the original price and suppose supported additional basis of $40,000 is confirmed. Adjusted basis becomes $810,000 and gain becomes $750,000. The closing cash remains $1,010,000 under these assumptions.

Those two changes have different effects. A price reduction changes both cash and gain. A correction to historical basis changes gain without creating new cash at closing.

Use this kind of comparison to prioritize missing documents. If one unresolved basis issue materially changes the tax reserve, resolve it before treating the available cash as ready to spend.

Sort gain into the proper categories

Federal tax does not apply one flat rate to every real estate gain. Net short-term capital gain generally uses ordinary rates. Eligible long-term capital gain can use the regular 0%, 15%, or 20% bands, depending on the return. [5]

Depreciation adds another layer. Some gain may be ordinary recapture. An individual's unrecaptured Section 1250 gain can face a maximum 25% rate. These categories should be separated rather than called one “recapture tax.” [5][6]

Business-property rules also matter. Section 1231 can affect the treatment of qualifying rental or business property, including a lookback for certain prior losses. A long holding period alone does not eliminate that review. [2]

Ask for a short category schedule beside the gain calculation. It should show the amount assigned to each category and identify assumptions that remain unresolved.

A statement such as “your tax is twenty percent” leaves too much unexplained. Twenty percent of what? Which categories? Federal only? Before or after losses? Those are reasonable questions, not tax trivia.

Turn categories into a limited tax illustration

For illustration only, assume the CPA classifies $280,000 of the original example's $790,000 gain as unrecaptured Section 1250 gain and $510,000 as regular long-term gain. Assume there is no ordinary recapture or other netting issue.

Further assume the entire first category is taxed at 25% and the entire second at 20%. These are modeled rates, not a claim that every owner would receive them.

The arithmetic gives $70,000 plus $102,000, or $172,000. Subtracting this from $1,010,000 leaves $838,000 after these modeled components.

This illustration excludes NIIT, state and local taxes, other income, credits, deductions, payment timing, and other return-level effects. Label the result accordingly. It would be misleading to present $838,000 as the owner's final spendable proceeds.

Ask the tax adviser for a complete calculation once the facts are known. Then use that estimate to compare your actual choices, including the investment risks and liquidity needs that tax math does not measure.

Check whether NIIT applies

Net investment income tax is a separate federal calculation. For individuals, it generally applies at 3.8% to the smaller of net investment income or the amount by which modified adjusted gross income exceeds the applicable threshold. [7]

The main thresholds are $250,000 for joint filers, $125,000 for married separate filers, and $200,000 for single and head-of-household filers. They do not operate like the regular taxable-income capital-gain bands.

Not every business activity or recognized gain has identical NIIT treatment. Ask the preparer to test the actual rental activity, gain, and relevant exceptions.

A sale can also move the owner's income across a threshold during the year. Use the full-year picture. Do not decide that NIIT is irrelevant simply because it did not apply on last year's return.

Add the state analysis

State tax should be a separate part of the estimate. California, for example, taxes capital gains as ordinary income rather than offering a lower capital-gain rate. [8]

Location and residence both need attention. The California Franchise Tax Board explains circumstances in which gain from California property remains California-source income after the owner becomes a nonresident. [9]

This does not mean every state follows California's approach. It means the property address and the owner's address are both important facts. State basis, credits, withholding, and reporting may also differ from the federal calculation.

For a proposed move, give the adviser the actual dates, residences, and property locations. “I will live elsewhere” is not enough information to finish a state-tax estimate.

Ask for the net result after any applicable credits and payments. Simply adding the highest federal and state rates can overstate or misstate the actual calculation.

A main home uses a different set of rules

A qualifying principal-residence sale may exclude up to $250,000 of gain, or up to $500,000 for eligible married taxpayers filing jointly. Ownership, use, lookback, and other requirements apply. [10]

The exclusion concerns gain, not the sale price or the mortgage balance. It is not a general exclusion for every second home, vacation property, or rental.

Prior rental use deserves careful review. Gain tied to depreciation allowed or allowable after May 6, 1997, cannot be excluded under the home-sale rule. Nonqualified use and prior exchange history can also affect eligibility or the amount excluded. [10]

Bring a dated use timeline to the CPA. Identify which parts of the property were rented, when you lived there, and what was claimed on the tax returns.

I would not make a moving decision based on the phrase “two out of five” without checking the rest of the facts. That phrase is only part of a larger test.

What a 1031 exchange changes

A qualifying 1031 exchange can defer eligible gain on business or investment real property. It is not a general rule allowing you to sell anything and avoid tax by buying something else. [11]

The exchange structure, property eligibility, ownership, identification, timing, cash, and debt all need review. Arrange the transaction before closing so the professionals can address receipt of proceeds and the required documents.

Deferral also affects the replacement property's basis. A new purchase price does not automatically become a completely fresh tax basis when prior gain is deferred.

For an original simplified basis illustration, assume a qualifying replacement costs $1,900,000 and the correctly determined deferred gain is $700,000. With no other basis adjustments, the model's replacement basis is $1,200,000. The assumptions must be checked against the actual exchange calculation. [3]

Then evaluate the replacement as an investment. A tax benefit does not repair a weak property, unsuitable debt, excessive fees, or a holding period that conflicts with your cash needs.

Seller financing has its own risks and tax rules

An eligible installment sale can spread some gain recognition as payments arrive. Interest is handled separately, and ordinary depreciation recapture generally must be reported in the sale year even if the related cash has not arrived. [12]

That creates two reviews: the tax schedule and the buyer's ability to pay. A note is not the same as cash in the bank. Credit quality, collateral, payment terms, and enforcement costs belong in the decision.

Ask the CPA to show first-year cash and first-year tax together. A plan that spreads payments may still require a substantial tax payment up front.

Ask the attorney to explain what happens if the buyer defaults. Then consider whether you want that continuing relationship with the property and buyer.

Seller financing should be selected because its full terms make sense, not because a headline suggests that all tax disappears until the last payment.

Losses and inherited property need their own review

A suspended rental loss, a capital-loss carryforward, and a prior Section 1231 loss are different items. Do not subtract all three from a sale estimate without applying their separate rules. Publication 925 explains passive-activity limits and qualifying complete dispositions. [13]

For example, selling an entire activity interest in a fully taxable transaction to an unrelated buyer may release suspended passive losses under the applicable conditions. An exchange or a partial sale may produce a different result.

Inherited property also requires a fresh look at the starting records. Basis is generally linked to the applicable estate valuation, subject to exceptions and special rules. It should not automatically be copied from the deceased owner's old purchase price. [3]

Keep the appraisal, estate documents, and any provided basis statement. If ownership is shared or only part of the property passed at death, ask the adviser to identify which portion receives which treatment.

These questions can be more important than finding a lower advertised tax rate. A correct starting fact changes every calculation that follows it.

Build one practical planning file

Before listing, gather the purchase closing statement, deeds, prior exchange forms, depreciation schedules, capital-project records, and recent returns. Add the loan payoff estimate and a realistic sale-cost budget.

As offers arrive, keep a dated version of the proposed sale terms. Identify the price, credits, assets included, financing, and expected closing date.

Give the preparer your other expected income and gains for the year. The property's tax result cannot be finalized from the property records alone.

I would put unresolved issues on the first page: missing invoices, uncertain use dates, incomplete entity records, or an allocation that still needs support. Assign each issue to someone who can resolve it.

Once the estimate is ready, ask for a short explanation you can repeat in your own words. You should know the gain, the current tax estimate, the cash left, and the assumptions that could change those amounts.

Compare offers after costs and tax

The highest headline price may not be the strongest offer for your needs. A buyer might ask for a large credit, a long delay, or seller financing. Put those terms beside the price before deciding.

As a simple cash comparison, suppose one buyer offers $1,500,000 with $70,000 of total sale costs. Another offers $1,540,000 with $125,000 of total sale costs. Assume those totals already include every negotiated seller credit, so no credit is counted again.

The first offer leaves $1,430,000 before debt and personal taxes. The second leaves $1,415,000. Its higher price produces $15,000 less cash at that stage. These are invented figures to show the comparison, not a statement about normal closing costs.

Next, have the preparer confirm which costs affect gain and how the complete tax estimates differ. Do not assume every cash outflow gets identical tax treatment. Then consider closing certainty, possession terms, and whether the timing works for a planned exchange.

I would keep the original offer and the comparison sheet together. If a buyer changes a credit or fee, update that line and date the revision. This lets everyone see why the expected cash changed.

Plan the payments before spending the proceeds

Federal income tax is generally paid during the year through withholding and estimated payments. A large sale can require a revised payment plan. The IRS explains the applicable payment rules and methods for uneven income. [14]

Keep the tax reserve separate from money earmarked for a new investment or family spending. Record what has already been withheld or paid and what still needs to be paid.

Do not confuse a closing withholding amount with the final tax bill. Have the preparer reconcile the amount against the actual return and determine whether another payment is needed.

Compare three realistic paths if they are available: keep owning, sell and retain the after-tax cash, or complete a suitable qualifying exchange. Use the same sale assumptions across the comparison.

My role is to help evaluate the investment choices alongside your needs and exchange requirements. Your CPA and attorney address the tax and legal conclusions. A clear plan connects those pieces without pretending they are the same job.

Frequently asked questions

Is capital gains tax based on my property's full sale price?

No. Gain generally compares amount realized with adjusted basis. Selling costs, basis adjustments, asset classification, and any applicable exclusion or deferral must be addressed before the current tax is calculated. [1][3]

Does my loan payoff lower taxable gain?

Principal payoff generally reduces closing cash rather than gain. The purchase financing is already reflected in the property's cost framework. Keep debt payoff and adjusted basis on separate lines. [2]

Why can depreciation increase the gain?

Depreciation generally reduces adjusted basis. A lower basis increases the gap between basis and net sale proceeds. The gain then needs to be sorted into the correct tax categories. [4][6]

Will all my gain be taxed at 20%?

Not necessarily. Regular long-term gains can span different bands, and depreciation-related gain can use other rules. NIIT, state taxes, other income, and losses may also affect the result. [5][7]

Can I use the home-sale exclusion for a rental?

Only if the actual ownership, use, and other requirements are met. Rental periods, depreciation, and prior exchange history can limit the result. A rental is not automatically eligible because you once lived there. [10]

Does a 1031 exchange permanently erase gain?

A qualifying exchange generally defers eligible gain. The deferred amount affects basis and may matter in a later transaction. Cash, debt relief, recapture, and other issues can also cause current recognition. [11]

Can seller financing defer every part of the tax?

No. Eligible installment treatment has limits, and ordinary depreciation recapture generally is recognized in the sale year. Interest and credit risk require separate analysis. Compare the tax schedule with actual expected cash receipts. [12]

When should I ask for a tax estimate?

Start before committing to the sale structure. Update it when price, costs, financing, ownership facts, or timing change. Ask for a payment schedule as well as an estimated total, so the money is available when needed. [14]

Sources and references

  1. U.S. Congress, via Cornell Legal Information Institute. 26 U.S.C. § 1001: Amount and recognition of gain or loss. Current statutory text.Relevant sections: Subsections (a)–(d): gain, amount realized, and recognition. Accessed October 6, 2026.
  2. Internal Revenue Service. Publication 544 (2025), Sales and Other Dispositions of Assets. Current available 2025 publication or operative IRS topic read October 6, 2026; use the actual sale-year forms and updates..Relevant sections: Gain and amount realized; ordinary recapture; asset-by-asset reporting; Section 1231 five-year lookback. Accessed October 6, 2026.
  3. Internal Revenue Service. Publication 551 (12/2025), Basis of Assets. December 2025 publication.Relevant sections: Basis increases and decreases; depreciation; exchange costs and replacement basis. Accessed October 6, 2026.
  4. U.S. Congress, via Cornell Legal Information Institute. 26 U.S.C. § 1016: Adjustments to basis. Current statutory text.Relevant sections: Subsections (a)(1)–(2): capital adjustments and depreciation. Accessed October 6, 2026.
  5. Internal Revenue Service. Topic no. 409, Capital gains and losses. Operative primary text read October 6, 2026. Tax-form references use the current available 2025 editions..Relevant sections: Special maximum 25% rate for unrecaptured Section 1250 gain; regular long-term gain rates depend on taxable income. Accessed October 6, 2026.
  6. U.S. Congress, via Cornell Legal Information Institute. 26 U.S.C. § 1: Tax imposed. Operative primary text read October 6, 2026. Tax-form references use the current available 2025 editions..Relevant sections: Subsections (h)(1) and (h)(6): individual rate treatment and definition of unrecaptured Section 1250 gain. Accessed October 6, 2026.
  7. Internal Revenue Service. Instructions for Form 8960 (2025). 2025 instructions.Relevant sections: Income scope; rental activities; deductions; modified adjusted gross income. Accessed October 6, 2026.
  8. California Franchise Tax Board. Capital gains and losses. Updated January 28, 2026.Relevant sections: Capital gains taxed as ordinary income for California purposes. Accessed October 6, 2026.
  9. California Franchise Tax Board. FTB Publication 1100, Taxation of Nonresidents and Individuals Who Change Residency. Current FTB guidance.Relevant sections: California-source property gain and changes in residency. Accessed October 6, 2026.
  10. Internal Revenue Service. Publication 523 (2025), Selling Your Home. Current available 2025 publication or operative IRS topic read October 6, 2026; use the actual sale-year forms and updates..Relevant sections: Business/rental use, depreciation after May 6 1997 not excludable, nonqualified use and separate areas. Accessed October 6, 2026.
  11. U.S. Congress, reproduced by Cornell Legal Information Institute. 26 U.S.C. §1031 — Exchange of real property held for productive use or investment. Current statute read October 6, 2026.Relevant sections: Subsections (a)–(h): held-for-use requirement, deadlines, boot, basis, liabilities, related persons, partnership exception and foreign property. Accessed October 6, 2026.
  12. Internal Revenue Service. Publication 537 (2025), Installment Sales. Current available 2025 publication or operative IRS topic read October 6, 2026; use the actual sale-year forms and updates..Relevant sections: Depreciation Recapture Income: ordinary recapture recognized in sale year even if no installment payment received. Accessed October 6, 2026.
  13. Internal Revenue Service. Publication 925 (2025), Passive Activity and At-Risk Rules. Current available 2025 publication or operative IRS topic read October 6, 2026; use the actual sale-year forms and updates..Relevant sections: Dispositions: entire activity, recognition of all gain/loss, unrelated buyer, installment and other limits. Accessed October 6, 2026.
  14. Internal Revenue Service. Topic no. 306, Penalty for underpayment of estimated tax. Current available 2025 publication or operative IRS topic read October 6, 2026; use the actual sale-year forms and updates..Relevant sections: Pay-as-you-go system, threshold exceptions, higher-income rules, annualized-income method. Accessed October 6, 2026.

Educational information, not an offer or a personal tax, legal, or investment recommendation. Examples are hypothetical and omit stated adjustments. Tax treatment depends on your facts and current law. Review your transaction with your CPA, attorney, and qualified intermediary. Real estate investments can lose value and may be illiquid.

Opening your workspace…