How to Calculate Cost Basis in 2026: Stocks, Inherited Assets, and Gifted Property
Cost basis is the starting point for calculating capital gains and losses when you sell an investment or property. The gain or loss subject to tax is the difference between what you receive from the sale and your cost basis in the asset. Getting the cost basis calculation right can mean the difference between paying significantly more or less in capital gains tax. For long-held assets, inherited property, and gifts, the rules for determining cost basis are less intuitive than simply looking up what you paid, and errors in either direction can create problems with the IRS.
Basic Cost Basis for Purchased Assets
For most purchases, cost basis starts with the purchase price, including commissions, fees, and other costs of acquisition. For a stock purchased for $5,000 with a $10 brokerage commission, the cost basis is $5,010. If you purchased shares in multiple lots at different prices over time, each lot has its own cost basis. The accounting method you choose for which shares you sell determines which basis applies to any given sale.
Reinvested dividends increase your cost basis. When a mutual fund or stock pays a dividend that you do not receive in cash but instead automatically reinvest in additional shares, that reinvestment is a taxable event and also increases your total cost basis. Investors who hold dividend-paying investments for many years and reinvest dividends often have a much higher actual cost basis than they realize, because they may have been paying tax on dividends every year and each payment increased the basis. Ignoring reinvested dividends leads to double-taxation of that income when the investment is sold.
Accounting Methods: FIFO, LIFO, Specific Identification, and Average Cost
When you have purchased the same security at multiple prices over time, you must choose an accounting method to determine which shares you are selling when you sell a portion of your holdings. The default method for most brokerage accounts is first in, first out (FIFO), which means the oldest shares are sold first. In a rising market, the oldest shares typically have the lowest basis and the highest gain, so FIFO often produces the largest taxable gain and is not usually the optimal tax choice.
Specific identification allows you to choose exactly which shares you are selling, identifying them by the lot they were purchased in. If you want to sell shares with the highest basis (to minimize gains or maximize losses), you can specify which lot to sell. This requires keeping detailed records and, for covered securities, instructing your broker before the sale which shares to use. Average cost basis averages the total cost of all shares by the total number of shares, which is available for mutual funds and some other securities. Each method produces different tax results; specific identification typically provides the most flexibility for tax planning.
Inherited Assets: The Step-Up in Basis
When you inherit property, your cost basis is typically stepped up to the fair market value of the property on the date of the deceased person's death. This step-up in basis is one of the most significant tax benefits in the code for wealthy families. If a parent bought stock for $10,000 that was worth $200,000 at death, and you inherit it and immediately sell it for $200,000, you owe no capital gains tax because your basis was stepped up to $200,000. The $190,000 of unrealized gain that built up over the parent's lifetime essentially escapes capital gains tax entirely.
The basis step-up applies to assets held in the deceased person's taxable estate. Assets held in an IRA or 401k do not receive a step-up in basis because they were never subjected to capital gains tax in the first place; withdrawals from inherited retirement accounts are taxed as ordinary income. Assets given away before death do not receive a step-up; they carry over the original owner's basis to the recipient. This is why estate planning often involves keeping highly appreciated assets in the estate rather than gifting them during lifetime.
Gifted Property: Carryover Basis with a Twist
When you receive property as a gift rather than an inheritance, you generally take the donor's cost basis, called carryover basis. If your parent gives you stock worth $50,000 that they originally paid $5,000 for, your basis is $5,000, not $50,000. When you later sell the stock, you pay capital gains tax on the $45,000 gain even though you did not personally invest the original $5,000. This is why receiving highly appreciated assets as gifts is less tax-favorable than receiving them as an inheritance.
There is a special rule for gifted property that has declined in value. If the fair market value of the property on the gift date was less than the donor's basis, the recipient uses different basis for gain and loss calculations: the donor's basis applies if you later sell the property at a gain, and the fair market value on the gift date applies if you sell at a loss. This prevents both a loss that was built up before the gift from being transferred and used by the recipient, and prevents the recipient from claiming a larger loss than the actual economic loss they experienced while holding the property.
Wash Sale Rule and Its Effect on Basis
The wash sale rule disallows a capital loss if you buy the same or substantially identical security within 30 days before or after selling it at a loss. When a loss is disallowed under the wash sale rule, it is not gone forever: it is added to the basis of the replacement shares. This means the disallowed loss will eventually be recognized when you sell the replacement shares at a later date, assuming you do not trigger another wash sale.
Tracking wash sales and their basis adjustments adds complexity to cost basis records, particularly for active traders or those who automatically reinvest dividends. Brokerage firms are required to track and report wash sales on your Form 1099-B for covered securities, but they only track wash sales within the same account. If you sell stock at a loss in a taxable account and repurchase it in an IRA or a spouse's account, you trigger a wash sale that your brokerage will not report, and you must track it yourself. Use our capital gains calculator to estimate your tax liability on investment sales, and read our guide on capital gains tax rates for 2026 to understand the rates that apply to your gains.
Free Tools Related to This Article
More Guides in General Law
Marcus Webb
Legal Research Editor
Certified paralegal and legal researcher with 11 years of experience across multiple practice areas. Specializes in translating complex legal standards into plain-English guides for everyday Americans.
Try Our Free Calculator
Get an instant estimate based on your numbers. No sign-up, no cost.
Calculate Your Capital Gains Tax →⚠️ Important Disclaimer
USLegalCalc.com provides estimates and document templates for informational purposes only. Results are not legal advice and vary by jurisdiction. Always consult a licensed attorney before making legal decisions.