Source: IRS Publication 527 (2025) for basis reduced by depreciation, and the IRS FAQ on unrecaptured section 1250 gain reviewed 2026-09-23 for the 25% and 3.8% starting percents, https://www.irs.gov/publications/p527.
Sale price $500,000. Selling costs $30,000. Balance $250,000. Original basis $350,000. Improvements $20,000. Building depreciation $80,000. Short-life depreciation $0. Recapture percent 25. Long-term gain percent 15. NIIT percent 3.8.
Adjusted basis is $290,000. Amount realized is $470,000. Gain is $180,000. The recapture slice is $80,000, times 25%, which is $20,000. Remaining gain is $100,000, times 15%, which is $15,000. NIIT is $180,000 times 3.8%, which is $6,840. Tax is $41,840. Sale net is $178,160.
New loan $320,000, costs $4,000, rate 7%, term 30 years. Refinance cash is $66,000. Monthly payment is $2,128.97. Interest over the term is $446,429.20. Current annual debt of $18,000 rises by $7,547.64 a year. Hold cash flow of $8,000 for 5 years is $40,000, and $178,160 divided by $8,000 is 22.27 years.
Adjusted basis is original basis plus improvements minus depreciation taken. Gain is sale price minus selling costs minus that basis. Building depreciation, up to the gain, is multiplied by the recapture percent. Short-life depreciation, up to the gain that remains, is multiplied by the ordinary percent. The rest of the gain uses the long-term gain percent. The NIIT percent multiplies the positive gain.
The field starts at 25 because the IRS FAQ reviewed September 23, 2026 says gain attributable to depreciation may be subject to the 25% unrecaptured section 1250 gain tax rate. The worksheet multiplies whatever percent is in the field.
Refinance cash is the new loan minus the current balance minus refinance costs. The recapture percent is applied on the sale side. Loan proceeds are not multiplied by that percent here.
Hold cash is the annual cash flow you type, times the number of years you type. When that annual cash flow is positive and the sale tax lines are filled in, the page also divides sale net by annual cash flow.
Estimates for planning; not tax/legal advice.