Home-Sale Capital-Gains Exclusion (§121)

Realized gain, $250k / $500k IRC §121 exclusion, and taxable gain.

Run the calculator

Example

You enter

You get

Details, formula, and sources

Two-of-five-year and non-qualified-use flags.

amount_realized = sale_price - selling_costs. adjusted_basis = purchase_price + capital_improvements. realized_gain = amount_realized - adjusted_basis. exclusion = min(realized_gain, cap) when the two-of-five test is met. cap = $250,000 single / $500,000 MFJ. taxable_gain = max(0, realized_gain - exclusion).

26 USC 121 (Internal Revenue Code §121). Cap last amended by TRA-1997; non-qualified-use reduction added by HERA-2008 (effective 2009).

26 USC free at uscode.house.gov. IRS Pub 523 (Selling Your Home) free at irs.gov.

Estimate. Lender governs final underwriting and rate / fee disclosure. Appraiser governs the appraised value. State law and the agency's program guidelines may impose stricter limits than the published thresholds.

Field names used by the API: filing_status, sale_price, selling_costs, purchase_price, improvements, meets_two_of_five, has_nonqualified_use, realized_gain, exclusion_applied, taxable_gain

Related tools