Home Sale Calculator: Cost Basis & Taxable Gain

See how much money you may walk away with after you sell your home with our home sale calculator. And the very different number the IRS may call a cost basis & taxable gain.

Home sale calculator for cost basis, cash proceeds and capital gains
Your cash at closing and your taxable gain are two different numbers.

A home sale calculator should answer the question most sellers actually mean: What do I walk away with? But there is a second number that matters at tax time: What gain does the IRS see?

Those numbers are not the same. Your mortgage payoff can dramatically reduce the cash you receive at closing without reducing your federal home-sale gain. That is the mistake I want this calculator to make nearly impossible to make.

Quick Answer: The Two Home-Sale Numbers

Cash before tax starts with the sale price and subtracts the selling costs, mortgage payoff and other closing cash outflows you enter. Tax gain starts with amount realized from the sale and subtracts your adjusted basis. The mortgage belongs in the first calculation, not the second.

The IRS calculation generally starts with your amount realized from the sale, subtracts your adjusted basis, and then determines whether some or all of the gain may qualify for the federal home-sale exclusion. If a standard Section 121 screen is clean, this tool can estimate a potential exclusion of up to $250,000, or up to $500,000 on a qualifying joint return. It deliberately does not pretend the remaining gain is your final tax bill.

On This Page
  1. Use the Home Sale Calculator
  2. Net Proceeds vs. Taxable Gain: The Home-Sale Difference That Trips People Up
  3. How This Home Sale Calculator Works
  4. What Counts Toward Your Adjusted Cost Basis?
  5. What If You Do Not Have Every Home-Improvement Receipt?
  6. How the 0,000 / 0,000 Home-Sale Exclusion Fits In
  7. When the Calculator Should Stop Instead of Guessing
  8. Choose the home-sale question you actually have
  9. Questions Home Sellers Actually Ask About Profit, Basis and Capital Gains
  10. Next Steps: Build the Number You Can Defend

Use the Home Sale Calculator

Enter the numbers you can support from your purchase records, improvement records and closing paperwork. The upgraded calculator now shows the cash side and tax-gain side together so you can see why they differ.

Home Sale Calculator

What would you really walk away with?

We'll separate the cash you may receive from the gain the IRS may care about — without making you take a tax-code exam first.

Your entries stay in your browser and are not submitted by this tool.

Start here

How much detail do you want?

Pick the version that matches what you need today. You can always start quick and make it more accurate later.

First number

What do you expect the home to sell for?

Use the sale price you realistically expect — not what you originally paid and not what you still owe.

A best estimate is fine. You can change it later.

Cash question

About how much do you still owe on the home?

Include mortgages and home-equity loans that would be paid off when you sell. If the home is paid off, enter $0.

This affects the cash you receive. It does not reduce your federal tax gain.

Tax starting point

About what did you originally pay for the home?

For a normal purchase, this is the simplest starting point for your tax basis. If you inherited, were gifted, or acquired the home another way, the detailed path will stop and flag that.

One helpful adjustment

Roughly how much have you spent on major improvements?

Think additions, a major kitchen remodel, roof, HVAC, windows or similar improvements that are still part of the home. Routine maintenance and ordinary repairs generally are not the same thing.

None or not sure yet? Enter $0. The result will remind you to verify before filing.

Last quick number

About how much will selling the home cost you?

Use one rough total for agent/broker compensation, title or escrow charges, transfer taxes, seller credits and other costs of sale.

Don't know yet? Leave it blank. We'll show a before-selling-cost estimate and flag it clearly.

Before we estimate the exclusion

Is this a pretty normal home sale?

Pick the closest answer. If something unusual happened, I'll still show the useful cash/gain math — I just won't fake a tax answer.

One follow-up

What made the sale unusual?

Pick the closest answer. This is only to tell the calculator where to stop — not to diagnose your tax return.

Fine-tune your basis

Do you know of buying costs that should be added to your basis?

Certain title, recording, legal and settlement costs can count. Mortgage interest, loan points, insurance and property taxes generally have different treatment.

Don't know? Leave $0 and verify later from your purchase closing statement.

Home-sale exclusion

How will you file taxes for the year you sell?

Ownership test

Was the home owned for at least 2 years during the last 5 years?

For a joint return, at least one spouse generally needs to meet this ownership test.

Use test

Did you live in this home as your main home for at least 2 of the last 5 years?

Two-year look-back

Did you use the home-sale exclusion on another home in the 2 years before this sale?

Joint-return check

Did both spouses live in the home as a main home for at least 2 of the last 5 years?

Your home-sale estimateQuick estimate

Two numbers. Two completely different jobs.

Estimated cash before tax$0After estimated selling costs and mortgage payoff.
Estimated gain before any home-sale exclusion$0Based on sale price, selling costs and the basis inputs you entered.

Why those two numbers are supposed to be different

Cash sideSale price − selling costs − mortgage payoff = the money that may reach you before tax.
Tax sideSale price − selling costs − adjusted basis = the gain the tax rules start with.
Michael's take: Your mortgage can slash the check you receive without changing your tax gain. That's the mix-up I want this calculator to prevent.
Show me the math
Expected sale price$0
Estimated selling costs$0
Mortgage / home-equity payoff$0
Adjusted basis used$0
What could change this estimate?
    Next: If this number matters for a real sale or tax return, verify the exact basis records and home-sale exclusion facts before you rely on it.

    Planning estimate only. This tool does not calculate your final federal or state tax bill, tax brackets, depreciation-related gain, Net Investment Income Tax, every basis adjustment, or every Section 121 exception. Verify the exact facts and IRS rules before filing.

    What the result means: “potential gain after screened exclusion” is still not your final federal or state tax bill. Capital-gain rates depend on your broader taxable-income picture. And of course what state you live in. Learn more about California’s State Capital Gains tax here. State tax, Net Investment Income Tax, depreciation-related gain and other rules can also matter.

    Michael’s Take

    A calculator earns trust by knowing when to stop. I would rather give you the right three numbers and a clear warning than a beautiful, precise-looking tax bill built on facts the tool never asked you for.

    Net Proceeds vs. Taxable Gain: The Home-Sale Difference That Trips People Up

    Search results, Reddit questions and even Bing queries reaching this page keep circling the same confusion: equity, cash proceeds and taxable gain get treated like interchangeable numbers. They are not.

    Three home-sale numbers that answer three different questions
    NumberWhat it answersMortgage payoff matters?
    EquityRoughly, how much home value is left after debt?Yes
    Cash / net proceeds before taxHow much cash may reach you after the sale costs and payoffs you entered?Yes
    Tax gainHow much gain results from amount realized minus adjusted basis?No

    The shareable rule: Your mortgage changes your cash, not your capital gain.

    If you sell a $900,000 home, pay $50,000 of qualifying selling expenses and have a $500,000 adjusted basis, the estimated gain is $350,000. A $100,000 mortgage payoff and a $500,000 mortgage payoff produce very different cash checks – but they do not change that $350,000 gain formula.

    This distinction is also why the redesigned calculator includes a share-safe copy button. It lets you share the lesson without broadcasting your personal sale price, mortgage or tax numbers.

    How This Home Sale Calculator Works

    The calculator separates the sale into five layers:

    1. Estimated net proceeds before tax: sale price minus the selling expenses, mortgage payoff and other cash deductions you entered. Think of this as the cash-side estimate, not the tax-gain formula.
    2. Amount realized: sale price minus qualifying selling expenses used in the gain calculation.
    3. Adjusted basis: starting basis plus qualifying basis increases and capital improvements, minus required basis reductions.
    4. Gain or loss: amount realized minus adjusted basis.
    5. Potential Section 121 exclusion: when the standard main-home screen is clean, estimate how much gain may be excluded.

    IRS Publication 523 uses the same basic gain architecture: selling price is adjusted for selling expenses to determine amount realized, and gain or loss is then determined using adjusted basis. It also provides the IRS worksheets for the exclusion and taxable-gain calculation.

    The tool intentionally does not turn the remaining gain into a flat 15% tax estimate. Long-term capital-gain rates depend on taxable income, and a home sale can interact with other rules. The 3.8% Net Investment Income Tax can also apply in some higher-income situations, while gain properly excluded under Section 121 is not included in net investment income for that purpose.

    What Counts Toward Your Adjusted Cost Basis?

    Your adjusted basis is not simply “what I paid plus every home receipt I ever kept.” The IRS generally starts with your cost in acquiring the property, adds qualifying increases to basis, and subtracts required decreases.

    Some purchase and settlement costs can increase basis

    Certain fees connected with acquiring the property can be part of basis. Others are not. Loan-related costs, prepaid interest, homeowners insurance and property taxes should not simply be dumped into a single “closing costs” number and assumed to qualify. Publication 523 provides the categories to work through.

    Capital improvements can increase basis

    A qualifying improvement generally adds value, prolongs the home’s useful life or adapts it to a new use. IRS examples include additions and major work such as a new roof, HVAC, certain landscaping, paving, a deck or patio, a pool and substantial kitchen or flooring improvements. Ordinary repairs and maintenance generally do not increase basis by themselves.

    The nuance matters: a repair completed as part of a larger qualifying remodeling or restoration project can be treated differently from the same repair done by itself. The useful rule is not “every receipt counts.” It is keep the record, then classify the cost correctly.

    Basis reductions can increase the gain you eventually report

    Adjusted basis can go down too. Depreciation allowed or allowable for rental or business use is one important example. Certain casualty adjustments, reimbursements, easements, energy-related adjustments and other items can also affect basis. Ignoring reductions can make the gain look artificially small.

    Your Home Basis File

    • Purchase closing or settlement statement.
    • Invoices, contracts and proof of payment for major improvements.
    • Permits or contractor records for large projects.
    • Insurance, casualty or reimbursement records that affected basis.
    • Depreciation records if the property ever had rental or business use.
    • Sale closing statement showing selling expenses and payoffs.

    What If You Do Not Have Every Home-Improvement Receipt?

    This is one of the most practical gaps I found in real homeowner discussions. People remember building the addition, replacing the roof or renovating the kitchen, but years later the invoice folder is incomplete.

    Do not jump straight from “I know I spent money” to an unsupported number in the calculator. Start reconstructing the record: bank and credit-card statements, canceled checks, contractor records, permits, emails, warranties and other contemporaneous evidence can help establish what was done and what you paid. For a material basis question with weak documentation, that is a good place for tax-professional help.

    The upgraded calculator lets you flag incomplete or reconstructed records. It will still show the arithmetic, but the result reminds you that calculation confidence cannot be better than input confidence.

    How the $250,000 / $500,000 Home-Sale Exclusion Fits In

    The exclusion applies to qualifying gain – not the sale price, not your equity and not the check you receive at closing.

    Under the general federal rule, a qualifying seller may be able to exclude up to $250,000 of gain. A qualifying married couple filing jointly may be able to exclude up to $500,000. IRS Topic No. 701 and Publication 523 explain the ownership, use and look-back rules. For the joint-return maximum, at least one spouse generally must meet the ownership test, both spouses must meet the use test, and neither spouse can have used the exclusion on another home during the relevant two-year period.

    Example: A $700,000 sale does not automatically mean a taxable gain.

    Suppose the amount realized is $660,000 after qualifying selling expenses and adjusted basis is $410,000. The gain is $250,000. If a single seller qualifies for the full $250,000 exclusion and no special issue applies, the screened gain remaining after that exclusion could be $0 – even though the home sold for $700,000.

    If your main question is the legal eligibility rule rather than the calculator math, use my separate capital gains tax on a home sale guide. That page owns the deeper Section 121 exceptions and reporting rules. This page owns the calculator and the numbers feeding it.

    When the Calculator Should Stop Instead of Guessing

    A good financial tool should have an obvious boundary. The calculator still shows the basic cash and gain math, but it stops before estimating the Section 121 exclusion when you flag facts that can materially change the analysis:

    • rental or business use and depreciation;
    • possible nonqualified use after 2008;
    • an inherited or gifted home;
    • a divorce transfer or prior like-kind exchange;
    • a co-owner buyout, bargain transfer or unusual title change;
    • a possible reduced exclusion because the full ownership or use tests are not met; or
    • a surviving-spouse, disability, military, Foreign Service or other special Section 121 rule.

    That is not the calculator failing. That is the calculator refusing to convert an incomplete fact pattern into false precision. Publication 523 shows why this matters: rental use can create depreciation-related gain even where other gain remains eligible for exclusion, and some sellers who fail the full test may still qualify for a partial exclusion.

    Questions Home Sellers Actually Ask About Profit, Basis and Capital Gains

    If I sell my house for $300,000, how much do I actually get?

    The sale price alone cannot answer that. Cash at closing depends on selling expenses, mortgage or other loan payoff, and other closing cash items. That is why this calculator now shows estimated cash separately from tax gain.

    Does my mortgage reduce capital gains when I sell my home?

    No – not as a separate subtraction in the federal gain formula. The mortgage affects your equity and cash proceeds. Gain is generally determined using amount realized and adjusted basis. Refinancing or carrying a large mortgage does not create more tax basis simply because the debt is larger.

    Is the $250,000 or $500,000 exclusion based on my sale price?

    No. The exclusion is applied to qualifying gain. A $900,000 sale can have less than $250,000 of gain, while a lower-priced home held for decades can have much more gain. Price by itself does not answer the tax question.

    Which home improvements can increase my cost basis?

    Qualifying capital improvements can increase basis. Think durable additions or improvements such as a major remodel, roof, central air, deck, pool or certain landscaping. Ordinary maintenance and standalone repairs generally do not. Use Publication 523 to classify the actual project rather than assuming every home expense qualifies.

    Which closing costs count toward basis?

    Some acquisition and settlement costs can be included in basis, but many financing and carrying costs cannot. On the sale side, certain selling expenses reduce amount realized. Do not enter the entire purchase or sale settlement statement as one tax-basis number without classifying the items.

    What if I lived in the home and then rented it out?

    Do not assume that converting a former main home to a rental automatically destroys the entire Section 121 exclusion – and do not assume the exclusion makes the rental years irrelevant either. Depreciation allowed or allowable can create gain that is not excluded, and nonqualified-use rules can matter in some timelines. That is why the calculator routes rental/business-use cases out of the simple exclusion estimate.

    If the calculator shows $100,000 of gain remaining, do I just multiply it by 15%?

    No. The remaining gain still needs a tax-rate analysis based on your holding period, taxable income and other facts. Higher-income taxpayers may also need to consider NIIT, and state treatment varies. A flat-rate shortcut can give a very confident wrong answer.

    Do I have to buy another house to get the home-sale exclusion?

    No. The current Section 121 exclusion is based on the applicable ownership, use and other eligibility rules; it is not conditioned on rolling the sale proceeds into another main home.

    Do seniors get a separate one-time home-sale capital-gains exclusion?

    The current federal Section 121 exclusion is not a special age-55 or senior-only exclusion. The standard eligibility rules apply, with separate special rules for certain circumstances such as qualifying surviving spouses, disability and specified service situations.

    What if I receive Form 1099-S even though I think all my gain is excluded?

    Do not ignore it. Publication 523 says that if you receive Form 1099-S, the sale generally must be reported on Form 8949 even when you have no taxable gain to report.

    The calculator lesson worth sending to someone else

    Sale price tells you what the buyer paid. Cash tells you what may reach your bank account. Adjusted basis helps determine what you actually gained for tax purposes. Three numbers. Three different jobs.

    Next Steps: Build the Number You Can Defend

    The number worth getting right first is your adjusted basis. Pull the purchase closing statement, improvement records, depreciation history if applicable and the sale closing statement. Then run the calculator with numbers you can document.

    If the tool gives you a clean standard Section 121 estimate, you have a useful planning starting point: estimated cash, estimated gain and potential gain remaining after the screened exclusion. If it stops because your facts are more complicated, that is useful too. It tells you exactly where a tax professional or a closer read of Publication 523 can add value.

    The mental model I want you to keep is simple: your mortgage tells you about cash; your adjusted basis tells you about gain.

    We are audience supported - when you make a purchase through our site, we may earn an affiliate commission.

    Michael Ryan
    Michael Ryan, Retired Financial Planner & Founder of MichaelRyanMoney.com Michael Ryan is a retired financial planner and financial educator with nearly three decades of experience in financial planning, retirement planning, estate planning, insurance, and risk management. He is the founder of MichaelRyanMoney.com, where he explains Social Security, Medicare and IRMAA, retirement income, taxes, estate planning, insurance, investing, and personal finance in plain English. His commentary has been featured by outlets including The Wall Street Journal, U.S. News & World Report, Business Insider, Yahoo Finance, Forbes, Newsweek, and Nasdaq. Michael no longer sells financial products, manages investments, or provides individualized investment, tax, legal, or insurance advice through the site.