Tax cost basis is the dollar amount the IRS treats as your investment in an asset, and it is what you subtract from your sale proceeds to figure the taxable gain or deductible loss. You calculate it by starting with what you paid, adding certain acquisition costs, and then adjusting the number up or down over the years you own the asset. Get the figure right and you pay tax on your actual profit; get it wrong and you either overpay the IRS or underreport income and risk penalties.
Where the Starting Number Comes From
Federal tax law begins with a simple rule: your basis in property equals what you paid for it, including any debt you assumed as part of the deal.1Office of the Law Revision Counsel. 26 US Code 1012 – Cost For a stock purchase, that is the trade price plus commissions. For real estate, the number is bigger than the contract price because qualifying closing costs fold in.
When you buy a home or commercial property, add to the purchase price the real estate commissions, title search and title insurance fees, recording fees paid to the local government, and transfer taxes. Your HUD-1 or similar closing disclosure itemizes every charge.2Department of Housing and Urban Development. Settlement Statement (HUD-1) Pay $250,000 for a property plus $12,000 in qualifying closing costs, and your starting basis is $262,000. Every dollar missed at closing inflates your taxable gain years later when you sell.
Adjustments While You Own the Asset
Basis does not stay frozen at the starting number. Certain events push it up, others pull it down, and the adjustments accumulate over the entire holding period.3Office of the Law Revision Counsel. 26 US Code 1016 – Adjustments to Basis
What Raises Your Basis
Capital improvements add to basis because they add value or extend the useful life of the property. A new roof, an added bedroom, a replaced HVAC system. Routine maintenance does not. Patching drywall, repainting, snaking a drain — those keep the property in its current condition rather than improving it, so they never touch basis. The line between improvement and repair trips up many taxpayers, and the IRS looks at it closely on audit. Legal fees you pay to defend or perfect title to the property also increase basis because they protect the capital investment itself.
What Lowers Your Basis
Depreciation is the most common downward adjustment. If you use property for business or rental purposes, the IRS requires you to deduct a portion of its cost each year to reflect wear and tear, and those deductions cut your basis dollar for dollar. A rental owner who claims $5,000 in annual depreciation over ten years has reduced basis by $50,000. At sale, you are taxed on the depreciation you claimed, or were entitled to claim even if you did not take it. Depreciation recapture on real property is taxed at a maximum rate of 25% rather than the standard long-term capital gains rate. Casualty losses and certain nontaxable distributions also reduce basis.
How the Starting Number Changes by Acquisition Type
Gifted Property
When someone gives you property, you generally inherit the donor’s basis rather than starting fresh at current market value.4Office of the Law Revision Counsel. 26 US Code 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If a parent bought stock at $50 a share and gifts it to you when it is worth $150, your basis for a future gain is still $50. The donor’s records become your records.
A dual-basis rule kicks in when the property has lost value at the time of the gift. If fair market value on the gift date is below the donor’s basis, you use the donor’s basis to figure a future gain and the lower fair market value to figure a future loss. Sell for a price between those two figures and you recognize no gain and no loss at all.4Office of the Law Revision Counsel. 26 US Code 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Built-in losses in gifted property often evaporate in the transfer.
Inherited Property
Inherited property works differently. The beneficiary receives a stepped-up basis equal to the property’s fair market value on the date of death.5Office of the Law Revision Counsel. 26 US Code 1014 – Basis of Property Acquired from a Decedent A parent who paid $80,000 for a house decades ago, worth $400,000 at death, leaves an heir with a $400,000 basis. All of that lifetime appreciation escapes income tax.
The executor can elect an alternate valuation date six months after death. The election is only available if it decreases both the total estate value and the combined estate and generation-skipping transfer taxes owed.6Office of the Law Revision Counsel. 26 US Code 2032 – Alternate Valuation If the property is sold or distributed within that six-month window, its value on the date of distribution controls instead. The election is irrevocable once made.
Personal Property Converted to Business Use
When you convert a personal-use asset into business or rental property, your depreciable basis is the lesser of your adjusted basis or the fair market value on the date of conversion. Your home’s adjusted basis is $300,000 but the market has fallen and it is only worth $260,000 when you start renting it out? Your depreciable basis is $260,000. The tax code does not let you depreciate a personal loss that occurred while the property was outside the tax system. You still need to allocate between land, which is not depreciable, and the structure itself.
Stock and Mutual Fund Basis
Securities carry their own quirks. In a stock split, total basis stays the same but spreads across more shares. Own 100 shares with a $10,000 total basis, and after a 2-for-1 split you own 200 shares at $50 each rather than $100. Non-dividend distributions, sometimes labeled “return of capital” on your 1099, reduce your per-share basis because the company is returning part of your investment rather than paying out earnings.
Corporate reorganizations like spinoffs and mergers require you to reallocate your original basis between old and new shares. The company involved typically publishes an allocation percentage after the transaction. Keep that notice. Reconstructing the numbers years later is painful.
Choosing Which Shares You Sold
Sell only some of your shares and you need a method for identifying which ones went. The default for most brokerages is first in, first out, which assumes the oldest shares leave first. Specific identification lets you tell the broker exactly which lot to sell, giving you the most control over the tax outcome: pick high-basis lots to minimize a gain, or low-basis lots to harvest a loss.
Mutual fund investors get an additional option, the average cost method. Add the total cost of all shares you own, divide by the number of shares, and use that single per-share figure.7Internal Revenue Service. Mutual Funds (Costs, Distributions, etc.) You must elect this method, and the election process differs for covered and noncovered securities. Once you use it for a fund account, switching back requires careful attention to IRS rules.
Turning Basis into a Gain or Loss
The math is straightforward. Subtract your adjusted basis from the amount realized on the sale, where the amount realized is the sale price minus selling expenses like broker commissions and closing costs. Sell a property for $500,000 with $20,000 in selling costs against an adjusted basis of $300,000, and the gain is $180,000.
You report capital gains and losses on Schedule D of Form 1040, with individual transactions listed on Form 8949.8Internal Revenue Service. Instructions for Schedule D (Form 1040) Your brokerage or financial institution sends Form 1099-B showing proceeds and, for covered securities, cost basis. Compare those numbers against your own records. Brokerages get basis wrong more often than you would expect, particularly after corporate actions, wash sales, or transfers between accounts.
Losses first offset gains of the same type, short-term against short-term and long-term against long-term, and any remaining net loss then offsets gains of the other type. A net loss left over after all that netting deducts against ordinary income up to $3,000 per year, or $1,500 if married filing separately. Unused losses carry forward indefinitely.
The Wash Sale Rule
Sell a security at a loss and buy a substantially identical security within 30 days before or after the sale, and the IRS disallows the loss. The disallowed amount gets added to the basis of the replacement shares instead of disappearing, deferring the tax benefit until you eventually sell those replacement shares in a transaction that does not trigger another wash sale. Form 1099-B should flag wash sale adjustments, but if you trade across multiple accounts, your brokerages may not catch them. Tracking those adjustments across accounts is on you.
Basis and the Home Sale Exclusion
For most homeowners, the biggest interaction with basis comes when they sell a primary residence. You can exclude up to $250,000 of gain from income, or $500,000 for married couples filing jointly, if you owned and used the home as your principal residence for at least two of the five years before the sale.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence For the joint $500,000 exclusion, both spouses must meet the use test, but only one needs to meet the ownership test.
This is why basis tracking matters even for a home you never intend to rent out. Gain above the exclusion is taxed at capital gains rates, and every dollar of improvement added to basis is a dollar subtracted from taxable gain. A couple who bought at $200,000, put in $80,000 of improvements, and sold for $850,000 has a $570,000 gain. The $500,000 exclusion covers most of it, leaving $70,000 taxable. Without the improvement records, the gain would look like $650,000 and $150,000 would be taxable.
Records and Penalties
The IRS expects you to keep records related to an asset’s basis for as long as you own the asset, plus the statute of limitations period after the year you dispose of it. In most cases that means three years after filing the return that reports the sale. Underreport gross income by more than 25% and the window extends to six years. Never file, or file a fraudulent return, and there is no time limit at all.10Internal Revenue Service. How Long Should I Keep Records? For nontaxable exchanges, keep records on both the old and replacement property until the limitations period runs out on the year you dispose of the new property.
Getting basis wrong can trigger the accuracy-related penalty, which adds 20% to any underpayment caused by negligence or a substantial understatement of income.11Taxpayer Advocate Service. Accuracy-Related Penalty Under IRC 6662(b)(1) and (2) For individuals, an understatement is substantial if it exceeds the greater of $5,000 or 10% of the tax that should have been shown on the return. A gross valuation misstatement bumps the penalty to 40%. Taxpayers who can demonstrate reasonable cause and good faith are exempt, but that defense requires documentation. Start keeping the paperwork the day you acquire any asset worth tracking.