Save on Taxes: Know Your Cost Basis

January 10, 2023
What is your cost basis? Whether you're a newbie or seasoned investor, determining your tax cost basis can help you save on taxes. Here's how.

Many people dislike thinking about taxes—so much so that they ignore the topic until filing season is upon them. Unfortunately, waiting until the last minute to deal with tax matters can lead them to miss opportunities to potentially reduce their tax bill.

"Investors who include tax planning as part of their investing strategy could potentially see significant tax benefits over the long run," says Hayden Adams, CPA, CFP® and director of tax and wealth management at the Schwab Center for Financial Research. 

You shouldn't just be thinking about capital gains and losses. Savvy investors know how to manage the so-called cost basis and holding periods of their investments to help reduce gains that are subject to taxes. Knowing your cost basis can be a valuable tool.

What is cost basis?

Simply put, your cost basis is what you paid for an investment. It includes brokerage fees, "loads" (i.e., one-time commissions that some fund companies charge whenever you buy or sell shares in mutual funds), and other trading costs, and can be adjusted to reflect corporate actions such as mergers, stock splits, and dividend payments. 

Cost basis matters because it is the starting point for any gain or loss calculation. If you sell an asset for more than your cost basis, you'll have a capital gain. If you sell for less, it's a loss.

Calculating your cost basis is generally pretty easy, but there are exceptions. For example, if you buy multiple blocks of the same share, even automatically through a dividend reinvestment plan, each block will likely have a different cost basis and holding period. A silver lining is that when it comes time to sell, you have the flexibility to pick whichever shares would work best for your tax strategy, whether that means parting with a high- or low-cost basis share, or one with a long- or short-term holding period.

Alternatively, you can go with the automatic default method, which requires less effort on your part, but could cost you more in taxes.

Note that determining the cost basis for bonds can be a bit more complicated, based on whether you bought them at "par" (face value), paid a premium, or got a discount. That said, if you bought the bond in 2014 or later, your brokerage firm is required to include the cost basis in your tax documents.

Reporting rules for cost basis

Brokerage firms are required to report your cost basis to the IRS when you sell an investment only if that investment was purchased after one of the following dates:

  • Equities (stocks, including real estate investment trusts, or REITs) acquired on or after January 1, 2011
  • Mutual funds, ETFs, and dividend reinvestment plans acquired on or after January 1, 2012
  • Other specified securities, including most fixed-income securities (generally bonds) and options acquired on or after January 1, 2014

Whether or not a brokerage reports your cost basis to the IRS, you're responsible for reporting the correct amount when you file your taxes. And the cost basis method you choose to identify the shares you sell can make a big difference in the amount you end up paying. To understand why, you have to know a little about how the IRS looks at cost basis accounting.

Cost Basis Methods

First-In, First-Out method

The "first-in, first-out" (FIFO) method automatically assumes you're selling your oldest shares first. So, if you gradually acquired 1,000 shares over the course of several years and later sold 100 of them, your brokerage would calculate your cost basis based on the earliest purchases. Often, the shares you've held the longest are the ones you purchased at the lowest cost, which means the FIFO method could result in the largest gain recognized and the highest tax obligation.

FIFO is Schwab's default cost basis method for all investments other than mutual funds, unless you provide instructions to the contrary.

Specific identification method

Alternatively, you could use the "specific identification" method to pick shares with a particular cost basis when you sell. This takes a bit more effort, but you'll have more control over your tax liability.

Say you bought 500 shares of XYZ Corp. 10 years ago for $10 a share ($5,000 total), and you paid a $50 brokerage commission, for a total cost of $5,050 ($10.10 a share). Several years later, you bought a second block of 500 shares for $60 a share ($30,000 total) and paid a commission of $10, for a total of $30,010 ($60.02 a share). 

A year later, the shares have risen to $100 and you decide to sell 100 of them (assuming a $10 commission on the sale). As you can see in the table below, using the FIFO method could result in much larger capital gains than specific identification. 

Calculate cost with care to pay less tax

By specifically identifying the shares you want to sell, in this hypothetical example, you would owe much less in capital gains tax. 

Calculate cost with care to pay less tax

Comparison of capital gains calculated using “first in, first out” (FIFO) cost basis method and the specific identification cost
Method Cost Proceeds Capital gain
FIFO $1,010
(100 shares x $10.10/share) 
$9,990 $8,980
Specific ID $6,002
(100 shares x $60.02/share) 
$9,990 $3,988

Identifying shares

How do you identify the specific shares you want to sell?

If you're placing the order by phone, tell your broker which shares you want to sell (for example, "the shares I bought on July 5, 2012, for $11 each").

At Schwab, if you place the order online, you'll see your cost basis method on the order entry screen. If you select the "specified lots" method, you'll be able to specifically identify which lots you want to sell.

Cost basis options for mutual funds

For mutual funds, you can also use a method called "average cost, single category," which determines your cost basis by taking the average cost of all the shares you own and multiplying it by the number you're selling.

This may be the simplest way to handle mutual fund sales when you're reinvesting dividends and/or regularly adding to your holdings. However, it comes with a major downside: If you choose it for your first sale, you must continue to use this method for every subsequent sale of shares acquired before that sale date. Whereas, opting for specific identification would allow you to pick and choose which shares to sell, potentially saving you money. 

For example, imagine you invest the same amount of money in mutual fund shares each month through an automatic investment plan. One month the shares might be up, so you buy fewer; the next month they might be down, so you buy more. Eventually, you end up with a portfolio of 1,000 mutual fund shares. Your lowest-cost shares were purchased for $10, your highest-cost shares for $100, and your average cost per share is $50.

One day, you decide to sell 100 shares with a market value of $60 each. We'll ignore commissions here to keep it simple.

The table below shows how the cost basis method you choose could affect your capital gain.

Your cost basis can help you book a gain or loss

Your cost basis can help you book a gain or loss
Comparison of capital gain/loss among FIFO, average cost single category, and Specific ID methods
Method Purchase price Sale price Capital gain/loss
FIFO $10 $60 $5,000
($50 x 100 shares) 
Average cost, single category $50* $60 $1,000 
($10 x 100 shares) 
Specific ID $100 $60 -$4,000
(-$40 x 100 shares) 

As you can see, each of these transactions results in the same pre-tax cash flow of $6,000, but your actual tax liability could vary greatly depending on the cost basis method you used.

So, which method should you choose?

No single method works well in every situation. Each has its benefits and downsides, depending on what you're trying to accomplish.

If you have modest holdings and don’t want to keep close track of when you bought and sold shares, using the average cost method with mutual fund sales and the FIFO method for your other investments is probably fine.

But if you're a tax-sensitive investor, specific identification could potentially save you a lot in taxes—especially if you use other tax-smart strategies, such as tax-loss harvesting, tax-gain harvesting, or donating appreciated assets to your favorite charity. 

Whichever method you decide to use, it's important to plan ahead so you aren't stuck with a huge tax bill come filing season.

Learn how to calculate cost basis.

Form 1099-B: Cost Basis and Options Trading

Learn what cost basis is, where to find it on Form 1099-B, and what option traders might expect with their Form 1099-B.

Understanding the Wash Sale Rule

Not sure if you made any wash sales last year? Watch to learn about wash sales and how to report them.

Beware Taxes on Discounted Munis

Discounted municipal bonds could expose you to unexpected taxes. Here's what to know before you buy.

Related topics

The information provided here is for general informational purposes only and should not be considered an individualized recommendation or personalized investment or tax advice. The investment strategies mentioned here may not be suitable for everyone. Each investor needs to review an investment strategy for his or her own particular situation before making any investment decision. 

All expressions of opinion are subject to change without notice in reaction to shifting market conditions. Data contained herein from third-party providers is obtained from what are considered reliable sources. However, its accuracy, completeness or reliability cannot be guaranteed. 

Examples provided are for illustrative purposes only and not intended to be reflective of results you can expect to achieve.

This information is not intended to be a substitute for specific individualized tax, legal or investment planning advice. Where specific advice is necessary or appropriate, Schwab recommends consultation with a qualified tax advisor, CPA, financial planner or investment manager.

Investing involves risks including loss of principal.

The Schwab Center for Financial Research is a division of Charles Schwab & Co., Inc.