How the calculator works
The calculator follows the same money down two paths and compares where you stand at the end of each year.
- Sell now. Sale price minus selling costs, minus the mortgage payoff, minus any capital gains tax. That cash is invested at the return you enter.
- Keep and rent. Each year, rent collected (after vacancy) minus management, maintenance, property tax, insurance, HOA and the mortgage payment, minus income tax on any rental profit. Each year's cash flow is invested at the same return (a negative cash flow is money you put in). At the end, the calculator adds what you would get from selling then: price minus selling costs, the remaining loan, and the tax on the sale.
The headline is the gap between the two at your comparison year. The table shows the same comparison if you sold at the end of any earlier year.
The tax rules it uses
- Section 121 exclusion. You can exclude up to $250,000 of gain ($500,000 for most joint filers) if you owned the home and lived in it as your main home for at least 24 months of the 5 years before the sale. If you lived there right up to your move-out, you must sell within 3 years of moving out. The calculator shows that date.
- Renting after you move out. IRS Publication 523 says time after the last date you used the home as your main home, within the 5-year window, is not “nonqualified use”. So renting it out for up to 3 years does not shrink the exclusion.
- Depreciation. A rental house is depreciated over 27.5 years, straight line. The basis is the lower of your adjusted basis or the market value when you convert it, times the building's share (land doesn't depreciate).
- Recapture. Depreciation after May 6, 1997 can't be excluded. That part of the gain is taxed at up to 25%. The rest of the gain is excluded if you still qualify, or taxed at your capital gains rate if you don't.
Worked example
A married couple owns a $600,000 house bought for $400,000. They lived there 4 years and owe $320,000 at 3.25% with 25 years left (principal and interest about $1,559 a month). It would rent for $3,200 a month. They assume 5% vacancy, 8% management, 10% for maintenance, $7,200 property tax and $2,000 insurance, 6% selling costs, flat prices, and a 4% return on invested cash.
- Selling now: $564,000 after costs, minus the $320,000 loan, leaves $244,000. The $164,000 gain is under $500,000, so no tax.
- Renting: $36,480 collected, $15,958 of expenses and $18,713 of mortgage payments leaves about $1,809 a year. Depreciation of about $11,636 a year ($320,000 building basis ÷ 27.5) wipes out the taxable profit.
| Year | Tax on sale | Keep and rent | Sell now, invest |
|---|---|---|---|
| 1 | $2,909 | $251,337 | $253,760 |
| 3 | $8,727 | $267,077 | $274,467 |
| 4 | $36,236 | $250,903 | $285,445 |
| 5 | $39,145 | $259,717 | $296,863 |
Through year 3, the only tax is 25% recapture on depreciation. In year 4 they miss the 3-year deadline, so the $164,000 gain is taxed at 15% too, and selling now comes out about $37,000 ahead by year 5. With rising prices or higher rent, renting can win; try your own numbers.
Edge cases
- Lived there less than 2 years. No full exclusion is assumed. A reduced exclusion may apply if you moved for work, health or unforeseen circumstances.
- Moved out long ago. If your 3-year window has already closed, both paths are taxed on the full gain.
- Condos and co-ops. Many buildings limit rentals or sublets. Check the bylaws and proprietary lease before you plan on rent.
What to do next
Check the gain on a sale with the home sale capital gains calculator, estimate the recapture bill with the depreciation recapture calculator, and stress-test the rental with the rental cash flow calculator. If you are in a condo, read renting out your NYC condo.