Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to the guide
THE FINANCEBASE List yours

Guide

How to Calculate Your Home’s Cost Basis and Capital Gain

By TheFinanceBase Team 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a U.S. federal tax estimate, calculate your home sale in this order: amount realized = selling price and other value received minus selling expenses; then gain or loss = amount realized minus adjusted basis. Only after that calculation should you test whether the main-home exclusion can shelter some or all of the gain. The mortgage balance or payoff by itself does not determine your gain.

This guide follows the Internal Revenue Service (IRS) rules for a generally purchased home. Rental or business use, inherited or gifted property, divorce, multiple owners, unusual acquisition histories, and state taxes can require different worksheets or allocations.

As an Amazon Associate I earn from qualifying purchases.

The two-part calculation

The IRS states that determining the result on a main-home sale requires the selling price, amount realized, and adjusted basis. Its detailed worksheet is in Publication 523 (2025), Selling Your Home.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“To figure the gain or loss on the sale of your main home, you must know the selling price, the amount realized, and the adjusted basis.”

#1 Best Overall
Kinevolve Mouse Pad for Excel/Word/PowerPoint/Windows Shortcuts – Small Excel Cheat Sheet Desk Pad – 11.8"x9.8" Portable Computer Mousepad – Gaming, Office, Waterproof, Non-Slip, Stitched Edges
  • Compact & Portable Design: This Small Excel, Word, PowerPoint, & Windows Cheat Sheet Mouse Pad measures 11.8" x 9.8", offering a portable mouse pad. Its compact size fits in bags or laptop cases, suitable for professionals, students, or travelers.
  • Multi-Software Shortcut Guide: Featuring essential shortcut keys for Excel, Word, PowerPoint, & Windows, this small mouse pad provides a quick reference for frequently used shortcuts, offering a reference designed to support workflow efficiency
  • Smooth & Precise Surface: The finely-textured surface ensures precise mouse control, allowing for smooth and accurate movement during work or gaming sessions.
  • Durable & Non-Slip Design: This Multi-Software Shortcut Mouse Pad features stitched edges to reduce fraying. The non-slip rubber base helps keep it securely in place, and the water-resistant fabric allows for easier maintenance.
  • Clear Print Quality: Displays high-resolution printing intended to remain legible through regular use and cleaning
— Internal Revenue Service, Publication 523 (2025)

Use these equations:

  1. Amount realized = selling price and other cash or property received, including qualifying debt paid or assumed as part of the sale, minus selling expenses.
  2. Gain or loss = amount realized − adjusted basis.

A positive result is a gain. A negative result is a loss. A loss on the personal-use portion of a home generally is not deductible.

Term What it measures Where it belongs
Selling price The stated price and value exchanged for the property Starting point for amount realized
Selling expenses Documented costs of completing the sale Subtracted from the selling price and other value received
Amount realized Net value received after selling expenses, including qualifying debt treatment Compared with adjusted basis
Adjusted basis Original acquisition cost, qualifying additions, and required reductions Subtracted from amount realized
Gain or loss The final difference Used to evaluate exclusion and reporting

Step 1: Calculate the amount realized

Start with the selling price and other value

Begin with the price stated in the sale documents. Amount realized generally also reflects cash received, other property received, and debt that the buyer assumes or that is otherwise paid as part of the sale. The IRS explains this treatment in its Property (basis, sale of home, etc.) frequently asked questions.

Do not limit the calculation to the check or wire that reaches your bank account. A noncash exchange or a liability handled through the transaction can affect the amount realized even though you do not receive that value as free cash.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Subtract selling expenses

Subtract the selling expenses that are properly connected with completing the transaction. Keep the settlement statement, closing disclosure, invoices, and proof of payment so that the amount you subtract can be supported. The result is your amount realized:

Selling price and other value received − selling expenses = amount realized

Why a mortgage payoff is not the gain calculation

If sale proceeds are used to pay off your mortgage, that payoff does not turn the remaining cash into the taxable gain. Gain is the amount realized compared with adjusted basis. A homeowner can have a gain even when little cash remains after paying the lender, or have no gain when a large amount of cash remains, depending on the basis and the sale terms.

Rank #2
Office Desk Accessories 2pcs Computer Monitor Memo Board Office Supplies | Computer Monitor Memo Board Computer Sticky Note Holder
  • [MULTIFUNCTIONAL]You'll get 2 pieces computer monitor memo boards that you can stick on the left and right edges of your monitor, and they're the perfect office desk organizers and accessories. Computer monitor side panels desktop organizer are suitable for home work or office,bringing convenience. Desktop memo is used to organize meeting memos, important messages, business cards, planning notes.Paste on the message board to keep track of important things and to-do items to prevent forgetting.
  • [🌟HIGHLY QUALITY] The material of computer screen side note holder is transparent acrylic. Durable, simple, stylish, light weight, easy to use, not easy to fall off or break. This cute office supplies for women desk can be used for a long time. This computer desk accessories is waterproof and dirt resistance, and look simple and stylish. The transparent acrylic sticky note holder as cubicle accessories is easy to notice the context of your sticky notes.
  • [📋Easy to use] Office must haves cool office gadgets for desk ready to tear, easy to install and remove, not easy to leave traces. You only need to peel off the protective film on the surface of the computer side board memo, wipe off the dust on the edge of the computer monitor, and then stick the desk essentials for women office on the right or left side of the tape, and you're done. A perfect gift for your colleagues, friends or classmates and family members or relatives
  • [🏢MULTI-SCENE USE] This desk supplies computer memo board can be applied to home and office, clear your office decor for women, suitable for most computer monitors, screens and cabinets, you can put it where you think, this cute office decor serve as a reminder. Stick on the computer side. It’s a good office gadgets can remind work improve office productivity. Pasted cabinets, dressers, refrigerators, walls, etc as cubicle accessories. To make life more orderly.
  • [💌NOTE] The adhesive force of the computer sticky note holder is very strong. It can not be directly pasted on the computer screen. It should pasted on the black edge of the screen. Narrow edge not recommended!!! If you are not satisfied with your purchase, or if the product is damaged or broken in transit, please let us know immediately. We will promptly solve your problem.

Step 2: Build your adjusted basis

Begin with acquisition cost

Start with what you paid to acquire the home, then add only costs the IRS treats as basis additions. Publication 523 provides worksheets for organizing the original cost, improvements, and reductions. Use that worksheet instead of assuming that every check written for the property increases basis.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add qualifying capital improvements

A capital improvement generally adds value, prolongs useful life, or adapts the property to a new use. Examples identified by the IRS include an addition, a new roof, central air conditioning, substantial kitchen modernization, and other lasting upgrades. The improvement must be part of the property and supported by records showing what was done and what it cost.

Separate improvements from routine repairs

Routine maintenance and repair work generally does not increase basis. Fixing a leak or painting ordinarily is treated as upkeep rather than a capital improvement. Repair-type work can become part of basis when it is performed as part of an extensive remodeling or restoration project. The surrounding project and its scope therefore matter; do not classify an isolated repair as an improvement merely because it was expensive.

Expenditure Typical basis treatment under IRS guidance Documentation to retain
Addition to the home Generally adds to basis because it adds value or adapts the property Contracts, invoices, permits, and payment records
New roof Generally a capital improvement Installer invoice and proof of payment
Central air-conditioning installation Generally a capital improvement Equipment and installation records
Substantial kitchen modernization Generally a capital improvement Scope of work and receipts
Fixing a leak Usually a routine repair; generally not added to basis by itself Keep records, but do not add automatically
Painting Usually maintenance; generally not added to basis by itself Keep records if part of a larger restoration
Repair within an extensive remodeling or restoration May be included when it is part of the qualifying project Complete project file showing the relationship

Subtract required reductions

Adjusted basis is not simply purchase cost plus improvements. Certain items reduce it. Potential reductions include:

  • Depreciation allowed or allowable for rental or business use.
  • Casualty-loss amounts that apply to the property.
  • Insurance reimbursements related to damage or loss.
  • Energy credits or subsidies that reimbursed improvement costs.

The IRS Topic no. 703, Basis of assets guidance explains that credits and reimbursements must be tracked. If another party or a credit program reimbursed a cost, you generally cannot treat the entire amount as though you personally bore it when determining basis.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In practical form:

Adjusted basis = acquisition cost + qualifying additions − applicable reductions

Rank #3
Taja To Do List Notepad, Undated Daily Planner for Work and Goal Setting
  • Stay Organized with Ease: Our To Do List Notepad provides multiple sections with plenty of space to jot down all of your important tasks.A versatile office supply perfect for daily task management, helping you keep track of everything that needs to be done and prioritize effectively.
  • Achieve Your Productivity Goals: Begin each day on a positive note, reminding you of your potential, strength, and the significance of staying focused on your goals. Our Daily Checklist Notepad is the ultimate tool to streamline your daily planning and elevate your productivity. With a clear and concise overview of your tasks, you can effortlessly prioritize what truly matters and make consistent strides towards achieving your goals.
  • Reliable and Stylish: Our to do list planner combines functionality with durability. With a transparent PP cover, the inner pages are well-protected from dirt and wear. Additionally, the back cover is crafted with thick paperboard, offering a stable surface for your writing needs. Each notepad includes 52 pages of high-quality, 100gsm paper, which is thick and non-bleeding, resulting in a smooth and enjoyable writing experience.
  • Versatile Use: This daily checklist notepad, suitable for teacher supplies and a wide range of applications, proves invaluable in various settings including work, school, and home. Whether you need to organize your daily tasks, plan a project, or create a grocery list, this notepad serves as the ideal tool. Its compact size ensures easy portability, allowing you to conveniently carry it with you throughout your day.
  • Perfect Present for Anyone: Our Daily To-Do List Notepad is the perfect present for those who value organization and productivity. With its stylish design and versatility, this office desk accessory is also a practical addition to school supplies. Suitable for students, professionals, and homemakers alike, it helps keep tasks and priorities in check effortlessly.

A complete illustrative calculation

The following numbers are an illustration, not a tax result for a particular taxpayer. Assume the homeowner has documents supporting each item and that the stated improvements qualify under the IRS rules.

  1. Purchase cost: $300,000.
  2. Qualifying acquisition or settlement costs added to basis: $8,000.
  3. Qualifying improvements: $60,000.
  4. Depreciation from a period of rental use: $10,000.
  5. Casualty-related reduction: $5,000.
  6. Energy credit or reimbursement tied to an improvement: $2,000.
  7. Sale price and other value received: $500,000.
  8. Selling expenses: $30,000.

The calculations are:

  • Amount realized: $500,000 − $30,000 = $470,000.
  • Adjusted basis: $300,000 + $8,000 + $60,000 − $10,000 − $5,000 − $2,000 = $351,000.
  • Gain: $470,000 − $351,000 = $119,000.

The $119,000 figure is the gain before considering any main-home exclusion. It is not calculated by subtracting a mortgage payoff from the sale price.

Apply the main-home exclusion only after finding the gain

Once the gain is known, test whether you qualify to exclude some or all of it. Under current IRS guidance, a qualifying seller may exclude up to $250,000 of gain. A qualifying joint return may be eligible for up to $500,000. These are maximum exclusions, not automatic deductions from every home sale.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

General ownership and use tests

In general, the relevant owner or owners must meet the ownership and use tests for at least 24 months during the five-year period ending on the sale date. Joint filers have specific ownership and use requirements, and other eligibility rules and exceptions can change the result. The IRS describes the current rules in Topic no. 701, Sale of your home and Publication 523.

Check prior use of the exclusion

Restrictions can apply if you used the home-sale exclusion for another sale during the two-year period before the current sale. Do not assume that meeting the 24-month ownership and use period alone guarantees the full exclusion.

Compare the gain with the available exclusion

Situation What to do
Gain is zero or negative There is no positive gain to exclude; a personal-use loss generally is not deductible.
Gain is less than the available exclusion and all requirements are met The qualifying gain may be fully excluded.
Gain exceeds the available exclusion The amount above the available exclusion can remain taxable.
Eligibility is uncertain Use the IRS tests and worksheets, and obtain tax advice for facts the general rules do not cover.

In the illustration above, the $119,000 gain is evaluated first. Only then would the homeowner determine whether the applicable exclusion is available and how much can be used.

Rank #4
Gogoonike Adjustable Laptop Stand for Desk, Metal Laptop Riser Holder | Portable Desktop Book Stands, Foldable Ventilated Cooling Computer Notebook Stand Compatible with 10-15.6” Laptops, Tablets
  • 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • 【Broad Compatibility】:Our desktop book stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

Special situations that need more than the basic worksheet

Rental or business use

When a home was rented or used for business, the personal and nonpersonal portions may need to be allocated. Depreciation allowed or allowable reduces basis. The IRS states that depreciation attributable to periods after May 6, 1997, is not covered by the home-sale exclusion, even if the property otherwise qualifies. Rental or business use can also create separate reporting requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inherited or gifted property

Inherited and gifted homes can have basis rules that differ from a straightforward purchase-cost calculation. Do not substitute the decedent’s purchase price, a donor’s figures, or an informal estimate for the specific IRS rule that applies to the transfer.

Multiple owners

Co-owners may need to determine each person’s share of basis, amount realized, gain, and exclusion eligibility. A joint return does not eliminate the need to satisfy the applicable ownership and use requirements.

Divorce or unusual ownership history

Transfers connected with divorce, changes in title, prior exchanges, and other unusual histories can affect basis and the calculation. Publication 523’s worksheets may not resolve every fact pattern; use the specific IRS rules rather than applying the ordinary purchase formula mechanically.

State income taxes

This article addresses general federal treatment. A state may use different rules, exclusions, filing thresholds, or definitions, so check the state requirements separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When and how the sale is reported

Publication 523 identifies situations in which a sale must be reported, including a taxable gain that is not fully excludable and receipt of Form 1099-S. When recognized gain must be reported, the IRS identifies Form 8949 and Schedule D as the relevant federal forms. The form you receive and your exclusion eligibility can both affect the filing obligation.

Best Value
Hiacry 8 Pack Gel Pens, Quick-Drying Black Ink, 0.7mm Fine Point Fidget Pen
  • Twin-Ball Design : Hiacry gel pen features a double ball conical tip that reduces writing resistance and provides a stable and smooth writing experience. 0.7mm quick drying black ink ensures no jumping, leakage or seepage.
  • Quick-Dry Long Lasting Ink:0.7mm black ink can slide effortlessly, dry immediately, & is not easily dirty. It has a high-capacity reservoir (up to 1300 meters), which is very suitable for left-handed & right-handed users.
  • Sleek Design for Journaling & Planning: Engineered with a low center of gravity and precision tip for steady ink flow, these journaling pens excel at note-taking, sketching, planning, and more. They combine stylish pens with top-tier performance.
  • Rolling Ball Design:The pocket clip with roll ball design can be easily attached to notebook pockets and binders, in addition, the fidget on the pen clip is also a small toy for your daily thinking to relieve stress.
  • Comfortable Non-Slip Grip:The ergonomic pen barrel has a soft rubberized coating for a comfortable, non-slip grip, so you won't get fatigued even after long hours of writing.
  • Keep the closing documents showing the sale price, expenses, and any debt handled through the transaction.
  • Reconcile any Form 1099-S with your records; its presence can create a reporting requirement even when you believe the gain is excluded.
  • For rental or business use, gather depreciation schedules and records needed to allocate the sale and report the nonpersonal portion.

Build a basis file before you sell

The IRS advises retaining records that support adjusted basis. Publication 523 generally points to keeping those records until three years after the due date for the return for the year of sale. Preserve the records in a form that will remain readable and connected to the property.

Purchase and closing records

  • Purchase contract and settlement or closing statement.
  • Evidence of the acquisition cost and qualifying settlement costs.
  • Documents showing later changes in ownership or title.

Improvement records

  • Contracts, permits, invoices, receipts, and payment evidence.
  • A description of what changed and when the work was completed.
  • Separate files for major projects so a repair is not confused with a capital improvement.

Reduction records

  • Depreciation schedules for rental or business periods.
  • Casualty-loss calculations and related insurance reimbursements.
  • Energy-credit or subsidy statements and the improvement costs they reimbursed.

Sale records

  • Listing, settlement, and closing documents.
  • Invoices and proof of payment for selling expenses.
  • Form 1099-S, if issued, and copies of filed federal forms.

Common calculation errors and how to correct them

Using the mortgage balance as basis

A mortgage is financing, not a measurement of what the property cost you for gain purposes. Rebuild basis from acquisition cost, qualifying additions, and required reductions.

Counting every home expense as an improvement

Separate lasting value-adding work from routine repairs and maintenance. Review the project as a whole when repair-type work occurred inside a substantial remodeling or restoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ignoring reimbursements and credits

Match each reimbursement or credit to the cost it covered. Do not add a reimbursed cost to basis without accounting for the reduction.

Forgetting depreciation

Rental or business depreciation can reduce basis even when it was not claimed correctly on an earlier return, because the IRS rules refer to depreciation allowed or allowable. Obtain professional help if prior filings and depreciation schedules do not agree.

Applying the exclusion before calculating gain

The exclusion is a later step. First compute amount realized, adjusted basis, and gain; then test ownership, use, prior-exclusion, and other eligibility rules.

Assuming a loss creates a deduction

A loss on the personal-use portion generally is not deductible. Do not report it as a deductible investment or business loss unless a separate rule actually applies to a nonpersonal portion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical order of operations

  1. Collect the purchase, improvement, reduction, and sale records.
  2. Calculate the amount realized by accounting for all value received and subtracting documented selling expenses.
  3. Calculate adjusted basis from acquisition cost, qualifying additions, and applicable reductions.
  4. Subtract adjusted basis from amount realized to determine gain or loss.
  5. If there is a gain, test the main-home exclusion and calculate the amount available under the ownership, use, filing, and prior-exclusion rules.
  6. Determine whether the sale must be reported, including whether Form 1099-S was issued and whether any taxable gain remains.
  7. Use Form 8949 and Schedule D when required, and address rental, business, depreciation, or other special portions under the applicable IRS rules.
  8. Retain the supporting records through at least the IRS’s stated three-year period after the due date for the return for the sale year.

The central discipline is to keep the three measurements separate: amount realized, adjusted basis, and gain. Once those are correct, the exclusion and reporting analysis can be applied to the facts of your sale.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a comment

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More guides

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.