If you owned and lived in your home as your main home for at least two of the five years before the sale, you can generally exclude up to $250,000 of gain from federal income tax, or up to $500,000 if you're married and file jointly. Gain above that is usually taxed as a capital gain. Arizona starts from your federal income, so gain you exclude federally generally isn't taxed by Arizona either. Rentals, second homes, home offices and short ownership periods change the math, so plan before you list.
One of the first questions sellers ask me is, "Am I going to owe tax on this?" It's a fair question, especially if you've owned your home for a while and values have gone up. I'm a CPA as well as a real estate broker, so this is a subject I care about. The good news is that most people selling their main home owe no federal tax on the gain at all. But not everyone, and the exceptions are worth knowing before you list.
This is general information, not tax advice for your situation. Every return is different, so bring your numbers to your own tax professional before you sell.
The home sale exclusion
The IRS lets you exclude a large part of the gain on the sale of your main home. According to IRS Topic 701, if you meet the ownership and use tests, you can exclude up to $250,000 of gain, or up to $500,000 if you're married and file a joint return.
To qualify, you generally need to have:
1 - Owned the home for at least two years out of the five years before the sale
2 - Lived in it as your main home for at least two years out of those same five years
3 - Not used the exclusion on another home sale in the two years before this one
The two years don't have to be in a row. You could live there, move out and rent it, and still qualify if you meet both tests within the five year window.
How to figure your gain
Your gain isn't simply the sale price minus what you paid. Here's the basic math.
| Step | What goes in it |
|---|---|
| Amount realized | Sale price, minus selling costs like commissions you agreed to pay, title and escrow fees |
| Adjusted basis | What you paid, plus certain purchase costs, plus the cost of improvements |
| Gain | Amount realized minus adjusted basis |
Here's an example with round numbers, just to show how it works. Say you bought for $300,000, put $40,000 into a kitchen remodel and a new roof, and sell for $650,000 with $40,000 in selling costs. Your amount realized is $610,000. Your adjusted basis is $340,000. Your gain is $270,000. A single seller who qualifies could exclude $250,000 and would have $20,000 of taxable gain. A married couple filing jointly who qualifies would owe nothing on it.
That's why I tell every owner to keep receipts for improvements. A new roof, a remodel, a pool or a room addition adds to your basis. Repairs and routine maintenance generally don't. Those receipts can lower your taxable gain years later, and the IRS's Publication 523 explains what counts.
When the exclusion may not cover everything
Here are the situations where I see sellers get surprised.
You haven't lived there two years. If you sell early because of a job change, a health reason or certain unforeseen circumstances, you may qualify for a partial exclusion. Otherwise the full gain may be taxable.
The home was a rental. If you rented it out, any depreciation you took (or could have taken) generally has to be recaptured and taxed when you sell, even if the rest of the gain is excluded. Time as a rental before you moved in can also reduce the exclusion.
You had a home office. Depreciation claimed for a home office is treated much the same way.
It's a second home or investment property. The exclusion is only for your main home. A second home or a rental doesn't qualify. For investment property, a 1031 exchange may be an option, which I cover in 1031 exchange basics.
Your gain is above the limit. Long time owners, especially in areas that have appreciated a lot, can exceed the exclusion. Gain above it is generally taxed at federal long term capital gains rates if you owned the home more than a year.
A loss on the sale of your main home isn't deductible. That surprises people too.
How Arizona taxes the gain
Arizona's individual income tax is a flat 2.5%, and Arizona starts from your federal adjusted gross income. So gain you exclude on your federal return generally isn't taxed by Arizona either. Any taxable gain that's left is included in your Arizona income, and Arizona allows a subtraction for part of a net long term capital gain in some cases. The Arizona Department of Revenue publishes the forms and instructions for the current year, and your tax preparer will apply them.
Reporting the sale
The title or escrow company may issue a Form 1099-S reporting the sale proceeds to the IRS. Some main home sales are exempt from that reporting if you certify that you qualify for the full exclusion, and others are reported regardless. Either way, if you receive a 1099-S, you'll generally report the sale on your return and claim the exclusion there.
If you're not a U.S. person for tax purposes, a separate set of rules called FIRPTA can require withholding at closing. Arizona sees this with some seasonal owners, and Arizona REALTORS addresses it in the standard forms. If this applies to you, bring in a tax professional early.
Plan before you list
The best time to think about taxes is before you sign a listing agreement, not after you close. The timing of a sale, whether you meet the two year tests and what records you have can all change the outcome. I'm happy to walk through the numbers with you as part of planning your sale, and to coordinate with your own tax preparer. More on why that matters in Why a Realtor who is also a CPA matters.
Questions, answered.
How much gain can I exclude when I sell my home?
If you qualify, up to $250,000, or up to $500,000 if you're married and file jointly, under the IRS home sale exclusion.
How long do I have to live in my home to avoid capital gains tax?
Generally you must have owned it and lived in it as your main home for at least two of the five years before the sale. A partial exclusion may be available in some situations.
Does Arizona tax the gain on my home sale?
Arizona starts from your federal adjusted gross income, so gain you exclude federally generally isn't taxed by Arizona. Any taxable gain left is taxed at Arizona's flat income tax rate.
Do home improvements reduce my capital gains?
Yes. The cost of improvements like a new roof or a remodel generally adds to your basis, which lowers your gain. Keep the receipts.
Can I deduct a loss on the sale of my home?
No. A loss on the sale of your main home isn't deductible.
Want to talk it through?
Bring me the specifics of your situation and I will tell you straight what I would do. No pitch, nothing to sign, and no obligation to work with me afterward.
Talk through your sale numbers
