Tools
Home sale tax estimator
Applies to United States and CanadaBy Sell My House Fast Editorial Team
Published Updated Last reviewed
Checked by our editorial process. How we write and check our guides.
What this tool works out
The home sale tax estimator works out the gain on selling a main home and how much of it is left out of income, under the US home sale exclusion or the Canadian principal residence exemption. It stops at the gain. It works out no tax owed, because no tax rate or threshold is among the site's verified facts.
This calculator needs JavaScript
JavaScript is off or has not loaded, so the form is not shown. The sections below explain every step of the calculation in words and work through an example, so the arithmetic can be followed by hand.
Your estimate
An estimate from the numbers you typed, not a quote, an offer or tax advice.
What does the estimator work out?
In both countries it starts from the sale and works down to the gain, then shows how much of the gain the federal rule leaves out of income and how much remains. Choose the country first: the two rules are different, and the form changes with the choice.
- In the United States, it follows section 121 of the Internal Revenue Code and IRS Publication 523, as the guide to capital gains tax on a home sale describes them. The result is the gain, the excluded gain and the gain that is not excluded.
- In Canada, it follows the principal residence exemption formula in paragraph 40(2)(b) of the Income Tax Act, as the guide to the principal residence exemption describes it. The result is the gain, the exempt part and the capital gain that remains.
Why does it stop at the gain?
Because the next step needs figures this site has not verified. Gain that is not excluded in the United States is taxed at rates that depend on the seller’s whole income, and the IRS publishes the thresholds by filing status for each year. 6 The guide to capital gains tax does not repeat them, and this tool does not either. In Canada, how a remaining gain is taxed, and at what inclusion rate, is outside the guide to the exemption, and no fact for it exists on this site.
A tax professional, such as a CPA, an enrolled agent, a tax attorney or, in Canada, a tax lawyer, can work out the tax a particular sale leaves.
How does the US mode work?
In the United States
The steps, in order
- Amount realized = sale price − selling expenses. Gain = amount realized − adjusted basis. Publication 523 says a loss on a main home cannot be deducted, so a loss stops the estimate. 4
- Depreciation. The part of the gain equal to depreciation allowed or allowable after May 6, 1997, cannot be excluded, and it is taken out first. 1
- Nonqualified use. Of the gain left after step 2, the share equal to the periods of nonqualified use divided by the whole time owned cannot be excluded. Publication 523’s worksheet leaves the depreciation part out before it allocates this share, and so does the estimator. 4
- The exclusion limit. One taxpayer can exclude up to $250,00011; a joint return up to $500,00012 when either spouse meets the ownership test, both meet the use test and neither is barred by the look-back rule. Otherwise each spouse’s own limit is worked out as if unmarried, and the two are added. 1
- The tests. A person meets the ownership and use tests by owning the home, and living in it as a main home, for at least 2 years13 each within the 5 years13 before the sale, and the look-back rule by not having excluded gain on another home sold in the 2 years14 before it.
- Excluded gain is the gain left after steps 2 and 3, up to the limit. Gain not excluded is everything else: the depreciation part, the nonqualified-use part and anything above the limit.
How is a reduced limit worked out?
In the United States
When a test is not met
A seller who fails a test can still exclude part of the gain when the sale is because of a change in place of employment, health or, to the extent regulations provide, unforeseen circumstances. 1 Publication 523 describes the events that count when they happen while the seller owns the home and lives in it: a new job or a transfer to a work location at least 50 miles farther from the home than the old one, or, with no previous work location, a new job at least 50 miles from the home; a move for the diagnosis, cure or treatment of a disease, illness or injury of the seller or a family member, or on a doctor’s recommendation; and unforeseeable events such as the home being destroyed or condemned, a death, a divorce or legal separation, a multiple birth from one pregnancy, becoming eligible for unemployment compensation, or becoming unable to pay basic living expenses after a change in employment. Where none of these applies, it also allows a partial exclusion when the facts and circumstances show the main reason for the sale was work, health or an unforeseeable event. 4
The full limit is then multiplied by a fraction, as the Treasury regulation on the reduced exclusion, 26 CFR 1.121-3(g), sets it out. On top is the shortest of three periods: the time the seller owned the home during the test period, the time the seller used it as a main home during the test period, and the time since the last sale that used the exclusion. Underneath is 730 when the periods are counted in days, or 24 when they are counted in months. 2
Each period is counted on its own, so time lived in the home before it was bought, as a tenant for example, counts as time used. The regulations say the ownership and use requirements may be met during periods that do not overlap. 3 Publication 523’s Worksheet 1 takes the same steps, and on a joint return repeats them for each spouse and adds the two results. 4
On a joint return, the statute treats each spouse as owning the home during the period that either spouse owned it, and the estimator counts ownership that way. 1
What does the US mode leave to you?
In the United States
Entries the estimator takes as you give them
- Nonqualified use is time after 2008 when neither the seller nor a spouse or former spouse used the home as a main home. Publication 523 lists three exceptions, which the estimator leaves you to take out of the time you type: the part of the test period after the home was last used as a main home; up to 10 years of qualified official extended duty in the uniformed services, the Foreign Service or the intelligence community; and up to 2 years of temporary absence because of a change of employment, health or other unforeseen circumstances. 4
- Special rules that change the periods: time in a licensed care facility, the choice to suspend the test period during qualified official extended duty, a home received from a spouse or former spouse, and a surviving spouse’s use of the late spouse’s time. The guide to capital gains tax describes each. Count the periods as those rules allow.
- A surviving spouse’s higher limit. An unmarried seller whose spouse has died can exclude up to $500,00012 instead of $250,00011 when the sale is no later than 2 years after the date of death and the joint-return conditions were met immediately before it. 1 The estimator does not apply this rule: for such a seller it shows the single limit, which can be lower than the law allows. The guide to capital gains tax describes the rule.
- Rules that shut the exclusion off completely: a home acquired in a like-kind exchange and sold within 5 years of that acquisition, and a seller subject to the expatriate tax. 1 The estimator does not test for them.
- Partial business or rental use of a separate part of the property, which Publication 523 handles with separate worksheets for each part. 4
- Whether the sale must be reported. IRS Topic no. 701 says a sale is reported when the seller receives Form 1099-S or cannot exclude all of the gain. 5
How does the Canadian mode work?
In Canada
The formula
- Gain = proceeds of disposition − outlays and expenses of selling − adjusted cost base. A loss on a home cannot be claimed, because the Canada Revenue Agency treats a home as personal-use property. 10
- B is the number of tax years, after the home was acquired, for which it is designated as the principal residence and during which the owner was resident in Canada, plus one extra tax year7 where the owner was resident in Canada during the year the home was acquired. 7
- C is the number of tax years ending after the acquisition date during which the owner owned the home. 9
- Exempt part = gain × B ÷ C, but never more than the gain: the folio’s own example shows a negative result being treated as zero. Remaining capital gain = gain − exempt part. 9
The estimator does not apply the flipped-property rule, under which a gain on a home owned for a short time is business income and the exemption is not available unless a listed life event applies. 8 It also leaves out the capital gains election reduction, which the folio sets aside in the same way, a home only part of which qualifies, and the elections on a change of use. 9 The guide to the exemption describes each.
How are the numbers rounded?
Amounts are worked out in whole cents. A reduced US limit, a nonqualified-use share and the Canadian exempt part are each a fraction of an amount; each is worked out exactly and rounded once to the nearest cent, half a cent up. Periods are whole numbers of months, days or tax years.
Worked examples
Example
The examples in the two guides
Illustrative numbers only. United States: a single seller owned and lived in a home for 12 months, had never used the exclusion and sold because of a qualifying new job. Twelve months over 24 gives half of $250,000, so the estimator shows a reduced limit of $125,000. Canada: an owner held a home for 10 tax years, designated it for 6 and was resident in Canada throughout. B is 1 + 6 = 7, so 70% of the gain is exempt: on a $200,000 gain, $140,000 is exempt and $60,000 remains.
Example
The examples in Publication 523 and the Canada Revenue Agency's folio
Taylor (Publication 523): sold for $600,000 with an adjusted basis of $373,000 after $27,000 of depreciation, and met the tests. The gain is $227,000; $27,000 cannot be excluded and $200,000 is excluded. Finley (Publication 523): sold for $700,000 with an adjusted basis of $380,000 after $20,000 of depreciation, owned the home 5 years and rented it for the first 2. The gain is $320,000; $120,000 is allocated to nonqualified use, $180,000 is excluded and $140,000 is not. Mr. A (folio, Example 1): a $50,000 gain, B of 1 + 7 and C of 10 leave $40,000 exempt and $10,000 remaining.
Example
The examples in the Treasury regulation
Example 1 (26 CFR 1.121-3(g)(2)): a seller bought a house, lived in it, and sold it 12 months later because of a change in place of employment. Twelve months over 24 of $250,000 is $125,000. Example 2: a married couple filing jointly sold the husband’s house, where he had lived since 1996, a year after the wife moved in, because of a change in her place of employment. He meets the tests and has the full $250,000; she has 365 days over 730 of $250,000, or $125,000; together $375,000.
The unit tests of the estimator reproduce each of these figures. The other tools are on the tools page, including the net proceeds calculator for the cash a sale leaves.
Assumptions this tool starts from
- Most gain one taxpayer can exclude on the sale of a main home under federal law
- $250,00011 Applies when the home was owned and used as the main home for at least 2 years in the 5 years before the sale. No exclusion applies to a sale within 2 years of another sale that used it; a reduced limit can apply to a sale because of a work move, health or unforeseen events.
- Most gain a married couple filing jointly can exclude on the sale of a main home under federal law
- $500,00012 Applies on a joint return when either spouse meets the ownership test, both meet the use test, and neither used the exclusion on another sale in the 2 years before. Otherwise each spouse's own limit applies, added together.
- Time a seller must have owned the home, and lived in it as a main home, for the full federal home sale exclusion
- 2 years13 The ownership and the use need not be one block of time or the same 2 years, but both must fall within the 5 years before the sale. Publication 523 counts the period as 24 months or 730 days, and the reduced exclusion divides by the same period.
- Period before the sale in which the ownership and use tests of the federal home sale exclusion are counted
- 5 years13 The period ends on the date of the sale, which Publication 523 says is the date of the closing. A seller on qualified official extended duty in the uniformed services, the Foreign Service, the intelligence community or the Peace Corps may choose to suspend it, within a limit the statute sets.
- Period before a sale within which an earlier sale that used the federal home sale exclusion bars using it again
- 2 years14 Selling another home in the period does not count if no exclusion was taken on it. A sale because of a change in place of employment, health or unforeseen circumstances may still get a reduced exclusion.
- Extra tax year added to the principal residence exemption formula (the "plus one" rule)
- one extra tax year7 Added only where the owner was resident in Canada during the year the home was acquired. The Canada Revenue Agency says its effect is to treat both homes as a principal residence in a year when one is sold and another bought.
Frequently asked questions
Does the estimator tell me how much tax I will owe?
No. It stops at the gain that is excluded or exempt and the gain that remains. In the United States, tax on the rest depends on the seller's whole income and the IRS's thresholds for the year; in Canada, on how a remaining gain is included in income. This site has not verified those figures, so the estimator does not use them.
How does the estimator count the time for a reduced US limit?
As the Treasury regulation on the reduced exclusion, 26 CFR 1.121-3(g), does, and as IRS Publication 523's worksheet does too. It takes the shortest of the time the home was owned in the 5 years before the sale, the time it was lived in as a main home in those 5 years, and the time since an earlier sale that used the exclusion. The time owned and the time lived there need not be the same time.
If all of my gain is excluded, do I still report the sale?
Sometimes. In the United States, IRS Topic no. 701 says a sale is reported when the seller receives Form 1099-S or cannot exclude all of the gain. In Canada, the Canada Revenue Agency says the sale and the designation must be reported on the return even when no tax is payable.
Related guides
Net proceeds: what you keep after a sale
What comes out of a home's sale price before the seller is paid in the US and Canada, from the mortgage payoff and liens to commission, costs and adjustments.
Capital gains tax on a home sale
How the US federal home sale exclusion works, who qualifies, how gain is figured, when a sale must be reported and how gain above the limit is taxed.
The principal residence exemption in Canada
How Canada's principal residence exemption works, what qualifies, how the designation is reported, the formula and when part of the gain is still taxed.
Sources
The documents this page relies on, in the order they are first used, with the date each was last checked.
- 26 U.S.C. § 121, Exclusion of gain from sale of principal residence. Office of the Law Revision Counsel, U.S. House of Representatives. 26 U.S.C. § 121. Primary source. Checked .
- 26 CFR § 1.121-3, Reduced maximum exclusion for taxpayers failing to meet certain requirements. Office of the Federal Register, Electronic Code of Federal Regulations. 26 CFR § 1.121-3. Primary source. Checked .
- 26 CFR § 1.121-1, Exclusion of gain from sale or exchange of a principal residence. Office of the Federal Register, Electronic Code of Federal Regulations. 26 CFR § 1.121-1. Primary source. Checked .
- Publication 523 (2025), Selling Your Home. Internal Revenue Service. IRS Publication 523. Primary source. Checked .
- Topic no. 701, Sale of your home. Internal Revenue Service. 26 U.S.C. § 121. Primary source. Checked .
- Topic no. 409, Capital gains and losses. Internal Revenue Service. Primary source. Checked .
- Income Tax Act, section 40 (principal residence exemption formula, paragraph 40(2)(b)). Department of Justice Canada, Justice Laws Website. Income Tax Act, R.S.C. 1985, c. 1 (5th Supp.), s. 40(2)(b); Income Tax Act, s. 40(2)(b), variable B. Primary source. Checked .
- Income Tax Act, section 12 (flipped property, subsections 12(12) to (14)). Department of Justice Canada, Justice Laws Website. Income Tax Act, R.S.C. 1985, c. 1 (5th Supp.), s. 12(12)-(14); Income Tax Act, s. 12(12), (13). Primary source. Checked .
- Income Tax Folio S1-F3-C2, Principal Residence. Canada Revenue Agency. Income Tax Folio S1-F3-C2. Primary source. Checked .
- Principal residence. Canada Revenue Agency. Primary source. Checked .
- Internal Revenue Code, 26 U.S.C. § 121. 26 U.S.C. § 121(a), (b)(1). Primary source. Checked .
- Internal Revenue Code, 26 U.S.C. § 121. 26 U.S.C. § 121(b)(2)(A). Primary source. Checked .
- Internal Revenue Code, 26 U.S.C. § 121. 26 U.S.C. § 121(a). Primary source. Checked .
- Internal Revenue Code, 26 U.S.C. § 121. 26 U.S.C. § 121(b)(3). Primary source. Checked .
Please note
General information, not tax advice
This page describes the rules in general terms as they stood on November 16, 2026. It does not apply them to your circumstances, and the rules can change. For a decision about your own sale, speak to a qualified tax professional. Read the full disclaimer.
Page history
- : Corrected the reduced US limit. It is now worked out one way, the Treasury regulation's, which Publication 523 follows. An earlier version also showed a second figure that no authority supports.
- : Added the work-move route for someone with no previous workplace, and Publication 523's facts-and-circumstances route.
- : First published.
Key facts
- Applies to
- United States and Canada
- Last reviewed
- November 16, 2026
- Sources cited
- 14
- Listed above, each with the date it was last checked.
Get connected with a local investor
Not sure which route fits?
Choose where the property is and what best describes your situation. On the next page you can ask to be put in touch with a local real estate investor, who may contact you about buying your home.