Skip to main content

Financial Planning
 

The key to financial planning is to start.

Whether you’re looking to create your first financial plan or want a second opinion on one you already have, it’s free to talk.

What is cost basis? How it affects your investment taxes

It’s a key number that determines how much of your profit you keep.

Article published: June 30, 2026

Put cost basis to work for you

An Edelman Financial Engines advisor can help you integrate cost basis into a more coordinated tax approach.

Cost basis is the original value of an investment for tax purposes, typically the purchase price plus any adjustments like fees or reinvested dividends. It’s used to calculate capital gains or losses when you sell an asset ... and it can have a meaningful impact on the taxes you pay.


Behind the scenes, there’s a number quietly following every investment you own – and it directly impacts how much you’ll owe in taxes when you sell. A lot of investors don’t pay much attention to it until the bill shows up.

It’s called cost basis. And while it sounds like harmless accounting jargon, it can eventually hit your wallet where it hurts. Here are cost basis taxes explained.

 

WHAT IS COST BASIS?

For any investment that’s taxable (which includes things like stocks and mutual funds, real estate investments and even baseball cards), your capital gains taxes are based on how much money your investment grew in value while you owned it. One piece of that equation is the price you got when you sold. The other piece is your cost basis. In other words:

Sale price – cost basis = taxable gain

(If the number at the end of the equation is negative, you have a loss, and that’s important to know too, since losses can be used to offset gains and lower your taxes.)

In the most straightforward cases, cost basis is just what you originally paid, which intuitively makes sense. But there are some scenarios that can change your tax basis, which we’ll get into below.

 

HOW TO CALCULATE COST BASIS FOR STOCKS

BASIC COST BASIS FORMULA AND EXAMPLE

To recap, the basic cost basis formula is simply what you net from selling an investment minus what you paid. That includes the share price as well as any brokerage fees.

So, if you bought shares at $10 and paid a $1 per share fee when you bought them, and another $1 fee when you sold, your cost basis for the shares is $12.

That assumes nothing happened to change your cost basis between buying and selling. We’ll tackle that next.

ADJUSTED COST BASIS

Here’s where it can start to get tricky. There are a few things that can happen while you own an investment that get included in the cost basis calculation. They include:

Reinvested distributions. Say you have ten shares of a fund which you bought for $5 each. Your account balance is $50 and your cost basis is also $50. After a year, the fund pays out a $1 dividend per share, which you reinvest. Your account balance goes from $50 to $60 (assuming no other price fluctuations, to keep things simple).

If your cost basis stayed the same, you’d have a taxable gain of $10 once you sold everything in your account. But wait. You have to pay taxes on the $1 dividend even if you reinvest it, so that part of your investment has already been taxed. That’s why when dividends or capital gains distributions are reinvested, the reinvested amount is added to your cost basis. So, your new cost basis is $60 and you have no additional taxable gain.

Stock splits. This one might be a little more intuitive. When a stock splits, your cost basis changes proportionally. If you own 10 shares that have a $50 cost basis and a $100 current value, your taxable gain is $500 ($50 gain x 10 shares). Now the stock undergoes a 2-for-1 split and you own 20 shares with a $50 value each. In other words, your original cost basis and the current share price are the same, wiping away your capital gains. The IRS won’t stand for that!

Instead, your cost basis also gets cut in half, to $25 per share. Your gain is now the $1,000 current value - $500 (the $25 cost basis x 20 shares), or $500, same as before.

Return of capital. This one is less common, but if you have an investment that’s intended to pay out a high yield (for example, REITs) and the investment doesn’t have the earnings to support a payout, they may make a payout that’s designated as “return of capital” - in other words, they’re giving you part of your investment back. That payout isn’t taxed, since it reflects your original money you started with. To ensure you eventually pay capital gains taxes on the appropriate amount, your cost basis is reduced by the amount of returned capital.

For example, if you have 10 shares with a cost basis of $100 and a current price of $200 (taxable gain of $1,000, or $100 gain x 10 shares) and the issuer returns $20 per share of capital to you, you now have 10 shares with a cost basis of $80 and a current price of $180 – leaving your taxable gain the same.

 

WHY COST BASIS MATTERS FOR INVESTORS

One important note is that for investments you have through a brokerage, your sales are reported to the IRS, including your cost basis. (That’s assuming you bought them after reporting requirements were established in 2008. If you bought them before that, it’s still on you to track and accurately report your cost basis, but your brokerage won’t have a number to report.) Ensuring that your understanding of your cost basis for sold shares is the same as your investment company’s can be more challenging than you’d think because in addition to scenarios that can change it, there are multiple methods of tracking it.

COST BASIS METHODS

The fact that your brokerage reports your cost basis for every sale of investments to the IRS raises an important question that needs to be clarified – exactly which shares did you sell? Since different groups of shares were probably bought at different times (with those different groups known as “lots”), they can have different cost bases.

Let’s say you bought 50 shares of a stock at $50. Later, you buy 50 more shares at $100. Now the stock is trading at $75 and you want to sell. But depending on which shares you sell, you could have a gain, a loss, or you could sell from both lots equally and have neither.

You can use any of several recognized ways of tracking and reporting cost basis. You can even generally choose or change your cost basis method at the point of sale. But it’s important for you and your brokerage to report the same information to the IRS.

These are a few common cost basis methods – your brokerage may also offer others.
 

Specific identification

This is probably the easiest cost basis method to understand, although it’s also the most manual. If you use it, you’ll always need to select (or “specifically identify”) the exact lots you want to sell. The benefit is that you’re in total control.
 

FIFO

FIFO stands for “first in, first out.” If you use this method, it tells your brokerage to always sell your oldest shares first. The potential benefit of this one is that it can help limit short-term gains, which have higher tax rates. However, your oldest shares may have the lowest cost basis and therefore the highest taxable gains.

If for some reason you can’t identify the shares you sold, the IRS requires you to use the FIFO method to calculate your cost basis.
 

LIFO

LIFO is the opposite – “last in, first out.” It tells your brokerage to always sell the most recently acquired shares. It’s not as common because it can tend to trigger more short-term gains.
 

Average cost

This method is only available for certain mutual funds. It tells your brokerage to track only the average cost basis of all shares you own. In our example above where 50 shares were bought at $50 and 50 shares were bought at $100, your average cost basis would be $75. That’s the cost basis that will be used no matter which shares are sold. It’s extremely simple but gives you the least control – and once you sell a lot using average cost, you wouldn’t be able to change to anything else later (except for shares purchased later).

 

SPECIAL COST BASIS RULES TO KNOW

STEP-UP IN BASIS FOR INHERITED ASSETS

There aren’t many opportunities to avoid paying capital gains taxes on increases in value, but the step-up in cost basis for inherited assets is a big one. Here’s how it works: Say your mother owns stock worth $100,000 that she’s had for decades (and she bought it for $5,000). There are $95,000 in built-in capital gains that will be taxed when she sells.

But if she never sells and you inherit the stock from her, that tax bill goes poof. The new cost basis for you is generally the market value on the date of death, and you’ll only rack up capital gains taxes on any increases after that.

This can be a major estate planning benefit. If you have assets you plan to leave to loved ones, it’s generally better to hold onto them than to sell and leave them the money, at least from a tax perspective.

COST BASIS FOR GIFTED ASSETS

Assets that are gifted during life are different – they retain the gifter’s cost basis. So, in our example above, if your mother instead gifted you the $100,000 in stock she’d bought for $5,000, you’d also receive the $95,000 in embedded capital gains and you’ll owe those taxes when the stock is sold.

If you’re on the flip side of that equation – you're the one who currently owns the assets – gifting them directly can again be a better option (at least for you) than selling them and gifting cash, as you won’t personally have to pay the capital gains taxes. And if you’re gifting to a qualifying charity or other tax-exempt organization, they may not have to pay capital gains taxes, either.

COST BASIS FOR REAL ESTATE

Some of the biggest capital gains you might see in your life don’t come from stocks and funds, but from your home. After major increases in home values during the last decade, many people have hundreds of thousands of dollars in taxable capital gains when they sell their main homes, and only the first $250,000 ($500,000 if you’re married filing jointly) is excluded.

The good news is that any money you spend improving the house gets added to your cost basis, as long as you have records. So new flooring, a bathroom and kitchen remodel, and upgraded outdoor space could easily add, say, $200,000 to your cost basis – and that’s money you won’t be taxed on.

If you sell a secondary residence, there’s no exclusion but the cost basis rules are similar otherwise. If you own real estate as an investment property, the calculation can be a little different, because you may have to account for depreciation while you owned the property.

 

HOW COST BASIS AFFECTS CAPITAL GAINS TAXES

Your cost basis is the key number that dictates capital gains taxes when you sell (along with the sale price). Because there are different cost basis methods, you have some control over what you’ll pay.

With a method like FIFO, you can lean more toward long-term gains (which have more favorable tax rates) and losses. With specific identification, you can choose lots based on what would be the most beneficial at the moment (generate short-term or long-term losses to offset other gains, minimize short-term gains, match a lot with a long-term gain to one with a long-term loss, etc). Some brokerages offer more sophisticated systems that follow a set of rules to try to always pick the lots with the most favorable tax rate, for instance.

When it comes to capital gains and cost basis, as with any tax strategy, your cost basis method shouldn’t be chosen in a vacuum. It should be considered in the context of your other tax strategies and your long-term goals.

COMMON COST BASIS MISTAKES TO AVOID

Watch out for these gotchas when it comes to cost basis:

  • Forgetting to include reinvested dividends and capital gains. Reinvestments increase your cost basis, but they’re easy to miss, which can lead to paying taxes twice on the same money.
  • Ignoring other adjustments. Stock splits, return of capital distributions and certain corporate actions all change your cost basis and should be tracked.
  • Assuming your brokerage records are always complete. Transfers between firms, older holdings or inherited assets can create gaps or errors in reported cost basis.
  • Using the “wrong” cost basis method. The default method isn’t always the most tax efficient choice for your situation.
  • Not being strategic with gifts and inheritances. Inherited assets often receive a step-up in basis, while gifted assets don’t.
  • Failing to coordinate cost basis decisions with your broader tax strategy. Selling investments without considering other gains, losses or income can result in higher‑than‑necessary taxes.

HOW A FINANCIAL ADVISOR CAN HELP YOU MANAGE COST BASIS

An Edelman Financial Engines advisor can help you understand how cost basis methods fit into your overall tax strategy and how to use them more intentionally when selling shares. An advisor can also point out whether you have an after-tax cost basis for tax-deferred accounts like 401(k)s and IRAs; this crops up if you’ve ever made non-deductible contributions to those accounts, meaning you may not have to pay taxes on the full account balance.

Opportunities like this can be easy to miss. A financial advisor can also help integrate your tax strategy into your overall financial planning, including optimizing your portfolio, saving for retirement, estate planning and more.

This material was prepared for educational purposes only. Although the information has been gathered from sources believed to be reliable, we do not guarantee its accuracy or completeness.

Neither Edelman Financial Engines nor its affiliates offer tax or legal advice. Interested parties are strongly encouraged to seek advice from your qualified tax and/or legal professionals to help determine the best options for your particular circumstances.

AM5589047


Wei-Yin Hu

Vice President, Financial Research and Strategy

With more than 30 years of experience, Wei helps lead a team of financial researchers and portfolio strategists who work on stimulating problems that also have a real-world impact on people’s lives. Their responsibilities include the development of the analytical models that generate Edelman Financial Engines recommendations and forecasts, as well as the design of new advice ...


Need more help?

Set up a free meeting and get guidance tailored to your unique circumstances.