FileTax.Com
Photo of a person reviewing stock investment data on a laptop in a bright, modern home office.

Stock Cost Basis: What It Is and How to Calculate It  

Updated June 11, 2026
Reviewed June 12, 2026
Fact Checked
Written by · 2 authors
  • Scott Dylan Westerlund
    Scott Westerlund
    Content Writer - Tax Law
Reviewed by

Your Takeaways:

  • Cost basis is purchase price + commissions/fees — the IRS's reference point for calculating capital gains.
  • Cost basis can change over time due to stock splits, reinvested dividends, return-of-capital distributions, wash sales, and corporate actions.
  • The cost basis method you choose (FIFO, average cost, specific ID) determines which shares are considered sold first — and can significantly affect your tax bill.
  • Brokers report cost basis on Form 1099-B for "covered securities" (stocks bought after 2011). For older or transferred holdings, you're responsible for tracking basis yourself.
  • Specific identification offers the most tax flexibility but requires confirming the lot at the time of sale, in writing, with your broker.
  • Inherited stock receives a stepped-up basis to fair market value at the date of death; gifted stock uses carryover basis from the donor.
  • Always verify your broker's cost basis figures against your own records — errors are common, and an incorrect basis can mean overpaying tax.

TL;DR: Cost basis is what you paid for a stock — it's the number subtracted from your sale price to determine your taxable capital gain or loss. Cost basis includes the purchase price plus commissions and fees, and adjusts over time for stock splits, reinvested dividends, and corporate actions. The cost basis method you choose (FIFO, average cost, or specific identification) can significantly affect your tax bill when selling part of a holding. Brokers report the cost basis on Form 1099-B for "covered securities" (stocks purchased after 2011), but you're responsible for verifying its accuracy.

What Is Stock Cost Basis and Why It Matters for Taxes

Stock cost basis represents how much you originally paid for a stock, including commissions, fees, and certain adjustments over time. It’s a critical number because the IRS uses your cost basis to determine whether you owe taxes and how much when you sell an investment.

Buying stock is not a taxable event. Taxes come into play only when you sell. At that point, your cost basis is subtracted from the sale price to determine your gain or loss.

  • If you sell for more than your cost basis, the difference is a capital gain, which may be taxable.
  • If you sell for less than your cost basis, you may have a capital loss, which can help offset other taxable income.

Because cost basis directly affects your capital gains or losses, even small details, such as fees, reinvested dividends, or stock splits, can make a meaningful difference in your final tax bill. That’s why understanding how cost basis works is essential for accurate tax reporting and smarter investment decisions.

If you have more questions about what’s taxable and what’s not, check out this resource to help you navigate your various investments.

Next Step: Understanding cost basis will help you accurately determine your capital gains and losses. Check out our capital gains tax basics page to learn everything you need to know about your tax liability and reporting gains and losses.

How to Calculate Stock Cost Basis (With Examples)

Calculating your stock cost basis starts with a simple concept: what you paid to acquire the shares. From there, you add certain costs to arrive at an accurate adjusted cost basis, the number the IRS uses when determining your taxable gain or loss.

Start With the Purchase Price

Begin with the original price you paid for each share. If you purchased multiple shares at once, use the total amount paid for all shares in that transaction.

Add Commissions and Fees

Next, include any commissions or transaction fees paid at the time of purchase. These costs increase your cost basis and reduce your potential taxable gain when you sell.

Basic cost basis formula:

Purchase price
+ commissions and fees
= adjusted cost basis

Calculate a Per-Share Cost Basis (If Needed)

If you bought multiple shares in a single transaction, divide your adjusted cost basis by the number of shares purchased to determine the cost basis per share.

This per-share figure becomes especially important if you sell only part of your holdings or later use specific cost-basis identification methods.

When Cost Basis Gets More Complicated

Cost basis calculations can become more complex if you:

  • Buy shares across multiple transactions
  • Reinvest dividends
  • Experience stock splits or corporate actions

In these situations, your cost basis may change over time. Later sections of this guide explain how adjustments and identification methods affect your final numbers.

Why Accurate Calculations Matter

Your cost basis is the foundation for calculating capital gains and losses. An inaccurate calculation can result in paying more tax than necessary or reporting incorrect information to the IRS.

Keeping detailed records from the start makes it much easier to report your investment activity accurately and avoid issues at tax time.

Next Step: Use these cost basis guidelines to help you determine whether you suffered capital gains or losses over the past tax year. Capital gains must be included in your taxable income, whereas capital losses can offset income. Check out this tax-loss harvesting article for more guidance on how to handle capital losses to your benefit at tax time.

Once you know your original cost basis, the next step is to understand how certain events can affect it over time.

Covered vs Noncovered Securities

Whether your broker reports cost basis to the IRS depends on when the security was acquired. The IRS distinguishes between two categories:

Covered Securities (Broker Reports Basis)

Brokers must track and report cost basis to the IRS for:

  • Stocks acquired on or after January 1, 2011
  • Mutual funds and DRIP shares acquired on or after January 1, 2012
  • Bonds, options, and most other securities acquired on or after January 1, 2014

For these securities, your Form 1099-B will show the cost basis your broker has on file.

Noncovered Securities (You Track the Basis)

For securities purchased before those dates — or transferred in from another broker without basis information — the broker reports gross proceeds only. The cost basis section will be blank or marked as noncovered.

Your responsibility: You must report the correct cost basis using your own records. If you can't substantiate basis, the IRS may treat the entire sale as taxable gain.

What to keep:

  • Original brokerage statements
  • Confirmation slips from purchases
  • Records of stock splits, mergers, and corporate actions
  • Documentation of any reinvested dividends
  • Records from previous brokers if shares were transferred

If basis is missing or unknown: Contact your broker for historical statements, check transfer paperwork, or use reasonable reconstruction methods (such as historical share prices on the purchase date if you know when you bought).

Cost Basis Adjustment Rules You Need to Know

These adjustments change your cost basis, which can directly affect how much capital gains tax you owe when you sell.

Another common type of cost basis adjustment happens when corporations take actions that impact your stocks. For instance, when corporations merge, it could result in an increase or decrease in the stock cost basis. Although they do not reduce the total cost basis of your investment, stock splits can reduce the per-share cost basis by increasing your overall share count.

Cost basis can also decrease when distributions unrelated to the stock’s earnings are made. Certain adjustments can reduce cost basis. For stock investments, this typically includes return-of-capital distributions. Depreciation adjustments generally apply to business or rental property, not personal stock holdings.

One important basis adjustment rule applies to wash sales. Wash sales occur when investors sell stocks at a loss and then purchase substantially identical shares within 61 days, including 30 days before and 30 days after the sale. These types of actions will increase the cost basis of the repurchased stock.

Source: IRS Pub. 550, Wash Sales

Next Step: Brokers should report a taxpayer’s adjusted cost basis on IRS Form 1099-B. Taxpayers can use this form to verify their records and calculations, but they shouldn’t rely entirely on the broker’s reporting. It’s best to do your own calculations to ensure your taxes are reported accurately.

Spinoffs and Corporate Actions

Corporate actions can split, transfer, or create new positions — each requires basis adjustments.

Stock splits: A 2-for-1 split doubles your share count and halves your per-share basis. Total basis stays the same.

Spinoffs: When a company spins off a subsidiary as a separate company, your original cost basis is allocated between the parent and spinoff based on the relative fair market values at the spinoff date. The company typically publishes guidance on the allocation percentages (often in an investor letter or IRS Form 8937).

Mergers and acquisitions: If you receive cash, your basis in the cash portion may trigger gain. If you receive stock in the acquiring company, basis usually carries over (in a tax-free reorganization). Read the merger documents — they specify the tax treatment.

Return-of-capital distributions: Some funds (especially MLPs and REITs) distribute "return of capital" rather than dividends. These reduce your cost basis instead of being taxed as income — but if your basis hits zero, future return-of-capital distributions become taxable as capital gain.

Why this matters: Brokers don't always handle these adjustments automatically. Verify any corporate action affecting your holdings, and adjust your records accordingly.

Photo of a laptop showing dividend reinvestment and long-term stock growth in a bright, modern workspace.

How Reinvested Dividends Affect Your Cost Basis

When dividends are reinvested, they’re used to purchase additional shares instead of being paid out in cash. This directly affects your cost basis because the value of those reinvested dividends is added to your existing investment.

Although reinvested dividends may feel automatic, they are still taxable in the year they’re received. You must report the dividend income on your tax return, even though the money was immediately reinvested.

The upside comes later. Because reinvested dividends increase your overall cost basis, they can reduce your taxable gain when you eventually sell the investment. In other words, a higher cost basis can mean a lower capital gains tax bill over time.

Reinvesting dividends is a common long-term investing strategy because it supports compounding growth over time. However, it also makes accurate recordkeeping more important. Each reinvested dividend creates a new cost basis layer that needs to be tracked to ensure your taxes are reported correctly.

Next Step: If you reinvest dividends regularly, review your brokerage statements carefully and keep your own records. This makes it easier to verify your reported cost basis and avoid surprises when it’s time to sell. Visit our dividend page for more information.

Cost Basis Methods: FIFO, Average Cost, and Specific ID

Cost basis identification methods determine which shares are considered sold first when you sell part of an investment. The method you choose can significantly affect your taxable gain or loss, especially if you purchased shares at different prices over time.

First-In, First-Out (FIFO)

FIFO assumes that the first shares you purchased are the first ones sold. This is the default method for most stock and bond sales unless you select an alternative.

Because older shares often have a lower cost basis, FIFO can result in higher taxable gains in rising markets.

Average Cost Method

The average cost method is commonly used for mutual funds and ETFs, particularly when dividends are reinvested.

Instead of tracking each purchase separately, this method averages the total cost of all shares and assigns the same cost basis to each one.

Average cost formula:

Total cost of all shares ÷ Total number of shares = Average cost per share

This approach simplifies recordkeeping but offers less flexibility for tax planning.

Specific Share Identification

Specific share identification allows you to choose exactly which shares you’re selling, based on their purchase date and cost.

This method provides the most control and can help minimize taxes by selling higher-cost shares first. However, it requires detailed records and clear instructions to your broker at the time of sale.

Important practical detail: To use specific identification, you must confirm the specific lot at the time of sale, in writing, with your broker, and receive written confirmation back. You can't decide which lot to sell after the fact when filing your taxes. If you don't make a specific ID election at sale time, your broker will default to FIFO (first-in, first-out) for stocks or average cost for mutual funds.

Why this matters: Specific ID is the most tax-flexible method — you can sell your highest-cost shares first to minimize gain — but only if you set it up correctly with your broker before each sale.

Pro Tip: ETFs tend to be more tax-efficient than mutual funds because ETF in-kind redemptions allow investors to avoid capital gains distributions that would otherwise apply to mutual fund sales.

Choosing the Right Method

Each method has trade-offs. Some are simpler, while others offer greater tax flexibility. The key is consistency. Once you use a cost basis method for an investment, IRS rules may limit your ability to change it without broker documentation or specific elections.

Source: IRS Pub. 550

So What?
Using the right cost basis identification method can help you manage your tax liability and avoid surprises when reporting stock sales to the IRS.

Understanding Stock Cost Basis and How It Interacts with Tax Reporting

When selling stock, you need to know your cost basis to accurately determine your capital gains and losses. The good news is that this guide covers everything you need to calculate your cost basis and complete your tax return.

One of the best ways to keep up with your cost basis for stock is to calculate it as soon as you purchase a stock and maintain meticulous records.

If you have more questions about capital gains and losses, check out our capital gains resource page.

This article is for educational purposes only and does not constitute tax, legal, or financial advice. Tax laws and dollar thresholds referenced are current as of the last reviewed date shown above and may change. For guidance on your specific situation, consult a qualified tax professional.

Filed Under:

See what some of the hundreds of thousands of satisfied customers have to say about our services:

Levi C

Levi C.

VERY FAST

I got approved within a couple of days for my tax extension filing through these guys, and they responded to my email the same day. Great customer service and fast results. Give them a shot.

LaMontica

LaMontica

Great Service!!

This is the second year that I have used this service. Each time, the process was quick, easy, and efficient. I will definitely be using this service in the future and will recommend it to friends and family.

Chezbie

Chezbie

Fantastic Site!!

The process was so easy. I processed this extension in a matter of minutes! For you last-minute filers out there, come here. It'll help you end your long day in peace!

Why Trust FileTax.com

• Written and reviewed by qualified tax professionals, including CPAs and tax law reviewers

• Reviewer and contributor profiles include credentials, expertise, and verification information

• Content is reviewed for tax accuracy, compliance, and clarity before publication

• Based on IRS guidance, state tax agencies, and current tax law updates

• Editorial standards and review processes are publicly documented

Links

Editorial Standards

Customer Reviews

IRS Authorized e-File Provider Verification

FAQs: How Your Stock Cost Basis Impacts Capital Gains

If the cost basis can’t be substantiated, the IRS may treat the proceeds as fully taxable. However, taxpayers are allowed to use reasonable records or reconstruction methods to establish a basis when possible.

If possible, contact your broker or review historical data to determine the stock's purchase price. You can also look back on your own personal financial records to see if you can find any documentation that proves how much you paid for your investment.