HIFO Cost Basis: Which Brokers Offer Highest In First Out Lot Relief
All five major US brokers default to FIFO, selling your cheapest shares first. Only Vanguard names a true HIFO method, and the default cost $4,689 more in tax.
August 2026 · Indexes
Educational only · Never places a trade
Five major US brokers were checked against their own documentation in August 2026, and all five default to first in first out for stocks, which sells your oldest and usually cheapest shares first. Only Vanguard names a true highest in first out standing method. Fidelity gets there through High-Cost and Tax-Sensitive, Schwab through High Cost and its Tax Lot Optimizer, and Interactive Brokers through Highest Cost. Robinhood offers nothing: its own help pages state the default is FIFO and that "the shares themselves aren't specifically tracked." On a 250 share sale of a position bought across four years, the gap between the FIFO default and a highest-cost election was about $4,700 of tax in the worked example below. The election is free, takes a few minutes, and has to be made before the trade settles.
Cost basis method is the most valuable account setting almost nobody touches. It does not change what you own, what you sell, or what you receive. It changes only which specific shares the broker reports as sold, and because those shares have different purchase prices, it changes your taxable gain. Below is what each broker actually offers, taken from their own documentation rather than from roundups, plus the case where highest cost is the wrong answer.
This is educational. We build index construction and backtesting software. We do not manage money, hold accounts, or give tax advice.
Which brokers offer HIFO cost basis?
Every broker here defaults to FIFO for stocks and ETFs, and to average cost for mutual funds. The difference between them is how far you can move off that default and whether the change sticks.
| Broker | Default, stocks | Highest-cost standing method | Other elective methods | Pick lots at the trade |
|---|---|---|---|---|
| Vanguard | FIFO | Yes, named "Highest in, first out (HIFO)" | Average cost, FIFO, Minimum tax (MinTax) | Yes |
| Fidelity | FIFO | Yes, as High-Cost, plus long-term and short-term variants | Intraday FIFO, LIFO, Low-Cost, Tax-Sensitive, Tax-Sensitive Short-Term, Specific Share Identification | Yes |
| Charles Schwab | FIFO | Yes, as High Cost, plus Tax Lot Optimizer | LIFO, Low Cost, Specified Lots | Yes |
| Interactive Brokers | FIFO | Yes, as Highest Cost | LIFO, Maximize Long Term Gain, Maximize Long Term Loss, Maximize Short Term Gain, Maximize Short Term Loss, Specific Lot | Yes, but Specific Lot cannot be the default |
| Robinhood | FIFO | No | None published | No |
Sources, all fetched in August 2026: Vanguard's cost basis methods page, Fidelity's capital gains and cost basis page and its disposal methods table, Schwab's cost basis documentation, the Interactive Brokers lot matching methods guide, and Robinhood's own help center.
What is HIFO cost basis?
Highest in first out means the broker treats the most expensive shares you own as the ones you sold, regardless of when you bought them. Because your gain is proceeds minus basis, selling the highest-basis shares produces the smallest gain and therefore the smallest tax on that sale. It is not a separate legal method in the tax code. It is an automated form of specific identification, which IRS Publication 550 permits: "If you can adequately identify the shares of stock or the bonds you sold, their basis is the cost or other basis of the particular shares of stock or bonds."
FIFO is what you get if you say nothing. Publication 550 is blunt about the fallback: if you cannot identify the shares you disposed of, "you must use the stock you acquired first to figure the basis." In a position that has appreciated, the shares you acquired first are the cheapest ones you own, so the default hands you the largest possible gain.
How much does the default actually cost?
Take an ordinary position built over four years: 150 shares at $41.20 in 2017, 100 at $129.50 in 2020, 100 at $248.75 in 2023, and 60 at $288.00 in early 2026. You sell 250 shares at $310.
| Method | Cost basis of the 250 shares | Taxable gain | Tax at 15% long, 24% short |
|---|---|---|---|
| Highest in first out | $53,810 | $23,690 | $4,065 |
| Average cost | $37,375 | $40,125 | $6,019 |
| FIFO, the default | $19,140 | $58,360 | $8,754 |
Same shares, same proceeds, same day. The difference between doing nothing and making one election is $4,689. You can run this on your own lots with our cost basis calculator, which walks your actual purchase history through each method and splits the result into long-term and short-term shares.
Note the average cost row, because it is a trap in disguise. Average cost is not available on ordinary stock purchases at all. Publication 550 restricts it to "mutual fund shares if you acquired the identical shares at various times and prices, or you acquired the shares after 2011 in connection with a dividend reinvestment plan." It is shown here only because most brokers apply it as the default on funds, where it usually lands between the two extremes.
Is HIFO always the cheapest method?
No, and this is where the marketing gets ahead of the arithmetic. In a stock that has risen steadily, your most expensive lots are also your newest, so a highest-cost election can pull shares you have held for under a year into the sale. Those become short-term gains taxed at ordinary rates of up to 37% instead of the long-term 0, 15 or 20.
In the worked example above, the highest-cost result includes 60 short-term shares. It still wins by a wide margin because the basis advantage is so large, but the margin is smaller than the headline suggests. Reverse the shape of the position, with a big recent purchase at a modest premium, and a plain long-term FIFO sale can beat it.
This is exactly what Schwab's Tax Lot Optimizer and Fidelity's Tax-Sensitive methods are built to handle. Rather than sorting purely on price, they weigh holding period alongside basis: realize losses first, short-term losses before long-term ones, and take gains last with long-term gains ahead of short-term. If you want one setting and no thinking, those are better choices than raw high cost. Vanguard's MinTax method does the same job under a different name.
How do I change my cost basis method?
Every broker in the table lets you set an account-level default in settings and override it per trade. The mechanics differ slightly, but the constraint is identical everywhere and it is the part people get wrong: the election has to be made at or before settlement, not at tax time. Once the 1099-B has been issued showing FIFO, you are arguing with a form the IRS already has a copy of.
Two practical habits are worth more than the setting itself. First, change the default now rather than per trade, because the per-trade override is the step you will forget in a hurry. Second, keep the confirmation. Adequate identification means you can show which lots you named and when, and a broker confirmation is the cleanest evidence there is.
One more wrinkle if you use funds. Once average cost is elected on covered fund shares it applies across the account and revoking it requires written notice to the custodian, generally within a year of the election or before your first sale. It is the one basis choice that is genuinely difficult to reverse.
What if I do not elect anything?
You get FIFO on stocks and average cost on funds, and for anything bought after 2010 the broker reports that figure straight to the IRS. Publication 550 notes that "generally, a covered security is a security you acquired after 2010, with certain exceptions", and for those the basis on your Form 1099-B is the number the IRS sees.
For older or transferred holdings the 1099-B may show basis as unknown, and the burden shifts to you. So does the correction burden on equity compensation: brokers routinely report only what you paid out of pocket for restricted stock units and employee stock purchase plan shares, ignoring the portion already taxed as wages on your W-2. Left uncorrected on Form 8949, that means paying tax twice on the same dollars. If you would rather have software read the 1099s and pull the numbers out than reconcile lot detail by hand across several brokerage accounts, that is the point in the process where it earns its keep.
The catch if someone else manages the account
Handing the portfolio to a direct indexing manager does not automatically fix the setting, and at least one large manager says so in writing. Aperio's Form ADV discloses that its strategy depends on the custodian defaulting to High Cost In, First Out lot relief, and that "Aperio has no responsibility to ensure that the custodian correctly implements the appropriate tax lot relief method."
Read that carefully. The manager harvests losses on the assumption that your custodian sells high-basis lots first. Most custodians default to FIFO. If nobody changes it, the engine you are paying 35 to 40 basis points for is being fed the wrong lots, and the tax alpha it was sold on quietly evaporates. It is worth a single email to confirm before the first rebalance, and it applies to any managed account, not just Aperio's.
The same dependency is why lot-level tracking is the real infrastructure behind these products rather than a feature. We compared how a dozen US providers handle it, including which run on an algorithm and which leave it to a portfolio manager's discretion, in our roundup of tax loss harvesting software. The wash sale mechanics that interact with all of this, including the 61-day window and the disallowed loss that gets added to your replacement shares, are covered in the tax loss harvesting rules.
What to do this week
Open each taxable brokerage account and look at the cost basis setting. If it says FIFO and you hold appreciated positions built over several years, change it to the tax-sensitive or optimizer option your broker offers, or to high cost if that is all there is. On Robinhood there is nothing to change, which is worth knowing before you build a large taxable position there. Then run your real lots through the cost basis calculator to see what the change is worth on the next sale you are actually planning, and price the resulting bill with the capital gains tax calculator.
None of this requires new software or a new account. It is a setting, and it is one of the few places in investing where a few minutes of admin reliably produces a four-figure result.
Build your index and see how it backtests
Bundle stocks or crypto into your own weighted index, backtest it against real market history, and track it against the S&P 500 or BTC. Educational and informational only, and Indexes never places a trade.