Worksheet 1 in plain language
Publication 523 starts with amount realized: selling price minus selling expenses. Subtract adjusted basis to get gain or loss. Selling price is usually the contract price. Selling expenses are costs of the sale itself, not repairs you made years earlier. Adjusted basis comes from your purchase and later adjustments — use the basis worksheet if you need to rebuild it.
Main-home losses
IRS Topic 701 and Publication 523 state that you generally cannot deduct a loss from the sale of your main home. The calculator still shows the negative figure so you can see the math, and it flags the nondeductible rule. Do not treat a negative result as a Schedule D loss without reading the rules for property that was converted to business or investment use.
Example
Sale price $500,000, selling expenses $30,000, adjusted basis $350,000 → amount realized $470,000 → gain $120,000. That gain may still be reduced or eliminated by Section 121; continue with the taxable gain calculator.
Selling expenses versus basis items
Commissions paid to sell the home usually reduce amount realized. A capital improvement you financed years earlier increases adjusted basis instead. Mixing those buckets double-counts or understates gain. When a settlement statement labels a charge ambiguously, map it with Publication 523’s categories before typing it into either the expenses field or the basis worksheet.
Buyer credits, repair escrow holdbacks and personal-property riders can also change the economic deal without fitting neatly into a single worksheet cell. If a credit is effectively a price reduction, some preparers adjust selling price; if it reimburses a specific expense, treatment may differ. Document the contract language and ask a professional rather than forcing every debit into selling expenses.
Installment notes and seller financing
If you carry a note for the buyer, amount realized for the year of sale follows installment-sale rules that are outside this calculator’s single-year price minus expenses model. Do not enter only the down payment as selling price unless you intend to model a cash-only sketch. Publication 537 covers installment sales; SaleGain stays on the straightforward Worksheet 1 pattern.
Scope and limitations
This gain-or-loss page stops before exclusions and state tax. SaleGain is independent of the IRS and does not prepare returns. Main-home losses shown here are generally nondeductible; confirm property character before putting a negative figure on Schedule D.
Like-kind exchange carryovers
If your home’s basis reflects a deferred gain from a prior like-kind exchange, Publication 523 and Form 8824 history matter. This calculator will not detect a buried deferred gain; you must reduce or adjust basis offline first. Misstated basis is the fastest way to understate taxable gain after an exclusion.