The Federal Home Sale Exclusion and the Two-of-Five-Year Test
This federal home sale exclusion (IRS Topic 701) applies once you meet two tests: an ownership test and a use test.
You must have owned the home for at least 24 months, or two years, out of the five years before the sale. You must also have lived in the home as your main residence for at least 24 months of that same five-year period.
Two-of-Five-Year Eligibility Checklist
Check each item below to get a sense of whether you qualify for the exclusion before you talk with a tax professional.
- You owned the home for at least two of the last five years.
- You lived in the home as your main residence for at least two of the last five years.
How to Calculate the Taxable Gain on a Home Sale
Your taxable gain equals your amount realized minus your adjusted basis. Your amount realized is your sale price minus your selling costs, such as commissions and closing fees. Your adjusted basis usually starts with what you originally paid for the home.

Capital improvements are upgrades that add value to your home, extend its life or adapt it to new uses. These improvements raise your home's adjusted basis, which can lower your taxable gain, under IRS Publication 523, Selling Your Home.
A repair is a cost that keeps your home in good condition without adding to its value. Routine repairs and maintenance, unlike capital improvements, do not raise your home's basis for capital gains purposes.
A home sale that is not fully excluded must be reported on Form 8949 and Schedule D of Form 1040. The same is true if you receive a Form 1099-S, the form that reports your home sale to the IRS.
Short-Term vs Long-Term Capital Gains Rates on a Home Sale
A home sale counts as a long-term gain when you owned the house for more than a year. Under IRS Topic 409, Capital gains and losses, that gain is taxed at 0%, 15% or 20% based on your taxable income.
A sale counts as short-term when you owned the home a year or less. That gain is taxed as ordinary income at the regular graduated rates.
Does Texas Charge Its Own Capital Gains Tax on a Home Sale?
Texas has no state income tax, so it also charges no state capital gains tax on a home sale. The federal rules above are the full tax picture for a seller in Dallas-Fort Worth.

A seller here only needs to check the federal exclusion, the ownership-and-use test and the capital gains rate, not a separate state return.
How Inheriting a House Changes the Capital Gains Calculation
If you inherit a house, your basis for figuring any taxable gain is the home's value on the date the previous owner died. That is different from the price the previous owner originally paid. This basis reset is called a stepped-up basis.
Because your basis moves to the home's value at the date of death, a sale soon after inheriting can produce a much smaller taxable gain. In some cases, there may be little or no taxable gain at all.
We buy inherited houses across Dallas-Fort Worth. If you are weighing what to do with an inherited property, see our page on selling an inherited house in Dallas-Fort Worth. Before you file your taxes, ask a tax professional to confirm the stepped-up value for your property.
Situation Comparison Table: Divorce, Downsizing, Foreclosure, Rental and As-Is Sales
The exclusion and basis rules above cover most home sales, but a few common situations change one part of the math. The table below shows what changes for each situation, with a link to the page that covers next steps.
| Situation | What changes in the capital gains math | Next step |
|---|---|---|
| Divorce | A seller going through divorce or legal separation may qualify for a partial exclusion even without meeting the full two-year ownership-and-use test. | See how our process works |
| Downsizing | The standard exclusion and ownership-and-use rules covered above apply, with no special exception for downsizing. | See our Texas downsizing and home-sale resource |
| Foreclosure | The gain is still based on amount realized minus adjusted basis, even in a forced sale. A home that was destroyed or condemned may also qualify for a partial exclusion. | Learn about stopping foreclosure |
| Rental property | A rental does not qualify for the primary-residence exclusion unless the seller lived in it as a main home for two of the last five years. | See how cash home buyers in Dallas work and close |
| As-is cash sale | Selling as-is to a direct buyer changes the selling-costs side of the math. The next section covers that part in detail. | See the next section below |
Divorce and foreclosure both carry legal details beyond the tax math shown here. A Texas attorney or tax professional can walk through the specifics of a decree, a settlement or a forced sale before the paperwork is filed.
Does Selling As-Is to a Cash Buyer Change the Capital Gains Calculation?
Selling a house as-is to a direct buyer does not change the federal exclusion or the basis rules covered above. It can change the selling-costs side of that math, since there is no repair or prep spending to subtract when you skip those steps before closing.
We buy houses directly from Dallas-Fort Worth homeowners for cash, in any condition. If you accept an offer, you pick the closing date. A local title company then handles the paperwork and settles any liens or payoffs from the proceeds.
Want to see how a cash offer is estimated? Read How Much Is My House Worth in Fort Worth, TX? first.
Common Questions About Capital Gains Tax on a Home Sale
How much capital gains tax will I pay on the sale of my home?
Your rate depends on your income and how long you owned the home, as explained in the rates section above.
Do I have to buy another house to avoid capital gains?
No. The federal exclusion covered above does not require you to buy a replacement home. You only need to meet the ownership and residence tests explained earlier in this article to qualify for that exclusion.
Talk to a Tax Professional, Then Get Your Cash Offer
The rules above give you the general framework. They reflect IRS guidance current as of 2025, so confirm today's numbers with a tax professional or the IRS before you file. Your exact gain depends on your income, your records of improvements and selling costs, and your filing status.
If an as-is sale fits where you are now, Matamna Homebuyers buys houses directly from homeowners for cash, in any condition, across Dallas-Fort Worth. You submit your property details and receive a written cash offer. Get Cash Offer to see what a direct sale could look like for your home.