When you sell shares that were purchased at different prices and times, the cost basis method determines which shares are considered sold first. This directly affects your capital gains calculation and tax liability.
๐ค Example: You bought 10 shares at $50, then 10 more at $100. When you sell 10 shares at $120, your gain depends on which shares you're "selling":
- Using FIFO: You sell the $50 shares โ $700 gain
- Using LIFO: You sell the $100 shares โ $200 gain
- Using ACB: Average cost is $75 โ $450 gain
Available Methods
FIFO (First-In, First-Out)
The oldest shares you purchased are sold first. This is the default method and required by most tax jurisdictions worldwide.
How it works: Your purchase lots are ordered by date, oldest first. When you sell, shares are matched against the oldest lots until the sale quantity is fulfilled.
Best for:
- Most investors (it's the legal default in many countries)
- Long-term investors who want to qualify for long-term capital gains rates
- Situations where your oldest shares have the highest cost basis
LIFO (Last-In, First-Out)
The most recently purchased shares are sold first.
How it works: Your purchase lots are ordered by date, newest first. When you sell, shares are matched against the most recent purchases.
Best for:
- Rising markets where recent purchases have higher cost basis
- Tax-loss harvesting when recent purchases are underwater
- Short-term trading strategies
HICO (High Cost)
Shares with the highest purchase price are sold first, regardless of when they were purchased.
How it works: Your purchase lots are ordered by cost per share, highest first. When you sell, the most expensive shares are matched first.
Best for:
- Minimizing capital gains tax
- Selling appreciated positions while keeping tax liability low
- Tax-efficient portfolio rebalancing
LOCO (Low Cost)
Shares with the lowest purchase price are sold first.
How it works: Your purchase lots are ordered by cost per share, lowest first. When you sell, the cheapest shares are matched first.
Best for:
- Years when you have low income and want to realize gains at lower tax rates
- Resetting cost basis higher on remaining shares
- Estate planning strategies
Manual (Specific Lot Identification)
Choose exactly which lots to close when selling, giving you complete control over your tax outcome.
How it works: When creating a Sell transaction for a position with existing lots you can select specific lots using the Transaction lots to close field. The selected lots will be closed first (in the order you select them), before the default cost basis method applies to any remaining quantity.
Best for:
- Tax-loss harvesting when you want to sell specific underwater lots
- Realizing long-term vs short-term gains strategically
- Picking the lots yourself when wash-sale rules apply to the trade
- Any situation where you need precise control over which shares are sold
To use manual lot selection:
- Create or edit a Sell transaction
- Look for the Transaction lots to close field (appears when selling from an existing position)
- Select one or more lots from the dropdown - they're listed by purchase date with remaining quantity
- The selected lots will be closed in the order you choose them
Wash sales are not detected automatically
Capitally does not identify wash sales or adjust cost basis for them. Do not edit the underlying transactions to compensate โ that corrupts cost basis, returns and every report that depends on them. Instead, pick the lots explicitly with Manual selection, adjust replacement-lot cost basis outside the automated calculation, and encode any treatment you apply every year in your tax preset.
ACB (Average Cost Basis)
All shares of the same asset are pooled together at a weighted average cost. Individual lots are not tracked.
How it works:
- Total cost of all shares รท Total number of shares = Average cost per share
- When you buy more, the new purchase is averaged into the pool
- When you sell, the average cost is used for all shares sold
Required in:
- Canada: ACB is mandatory for most securities. The average is calculated across all accounts.
- UK: Known as "share pooling" or Section 104 holding. Calculated per account with special same-day and 30-day matching rules.
- Germany: ACB is used for shares purchased after certain dates.
Why you can't find "Section 104" in the app. Capitally uses accounting terminology rather than jurisdiction-specific tax terminology, so what HMRC calls a Section 104 holding is called Average Cost Basis here. The calculation is the same one: since 6 April 2008 HMRC pools shares of the same class in the same company and takes the pool average as the cost basis, matching a sale first against same-day purchases, then against purchases in the following 30 days, then against the pool. That matching order is the UK ACB Variant.
To switch it on:
- Go to Settings โ Taxes and select the UK preset, or clone it.
- Confirm Cost Basis is Average Cost Basis โ the default for the UK preset.
- Assign the preset to your accounts in Account settings.
- Confirm your positions sit on that account and not on
<No Account>, or nothing will be taxed.
Setting Your Cost Basis Method
You can configure cost basis methods at multiple levels. More specific settings override general ones.
Project Default
The tax preset attached to your accounts determines the default method for tax calculations. Built-in presets use the method required by that jurisdiction.
Per Account
Set a default method for all positions in a specific account:
- Go to the Account's settings
- Navigate to the Positions tab
- Set the Cost basis method
This is useful when you have accounts in different jurisdictions with different requirements.
Per Asset
Set a default method for a specific asset across all accounts:
- Open the Asset details
- Navigate to the Positions tab
- Set the Cost basis method
This is useful for assets with special tax treatment.
Per Position (Account + Asset)
Override the method for a specific asset in a specific account:
- Open either the Account or Asset settings
- Navigate to the Positions tab
- Click Set account or Set asset to add a specific override
- Configure the Cost basis method for that combination
Holding the same asset in two accounts
Lot-based methods do not pool across accounts. FIFO, LIFO, HICO and LOCO track lots at position level โ one asset in one account โ so the same security held at two brokers has two independent sets of lots, and a sale in one account is never matched against a purchase in the other. Only Average Cost Basis can pool, because it is the only method with a setting for it.
Moving a holding from one account to the other with a Convert / Move / Spinoff transports the lots themselves into the destination set, with their dates and bases unchanged, so FIFO ordering and holding periods carry on from the original purchases rather than restarting. Average Cost Basis works the other way: the lot joins the receiving pool on the day it arrives, because that is when the account actually held it.
๐ค Example: you bought 10 shares at 2 and later 20 at 5, then moved all 30 to another broker. The destination holds two lots with bases of 20 and 100, not one blended lot. Selling 10 of them at 6 under FIFO realizes 40; a blended basis of 4 per share would have reported 20.
- Average Cost Basis, pooled by Asset โ one average cost across every account. This is what Canada requires.
- Average Cost Basis, pooled by Asset + Account โ a separate average per account. This is the UK and German approach.
- FIFO, LIFO, HICO, LOCO, Manual โ always per position. There is no cross-account option.
Create a single asset per security and add it to each account by booking transactions there. Creating one asset per broker splits cost basis and returns for good, and duplicates are not flagged when you create an asset by hand. To see the combined holding, open the asset from the Assets tab: it shows total returns and every account it is held in. Adding an Asset Symbol or ISIN column to the positions table and sorting by it groups the same asset's positions across accounts.
Cost Basis in Reports
Taxable Income Report
The Taxable Income Report shows closed positions with their expense (cost basis), revenue (sale proceeds), and income (gain/loss). The cost basis shown reflects your chosen method.
This report does not take into account Average Cost Basis!
It works on transaction lots, and for positions using Average Cost Basis it will default to FIFO to assign the lot.
When grouped by Transaction Lot, you can see exactly which purchase lots were matched against each sale - helpful for verifying the correct method was applied.
Taxes Due Report
The Taxes Due Report calculates taxes based on your tax preset rules. The cost basis method affects the expense value available in your preset's statements.
For ACB presets, the expense reflects the average cost at the time of sale rather than specific lot costs.
This is why Realized Return on the portfolio and the tax figures can differ and both be right: Realized Return uses the lot-matching method configured for the position (FIFO unless you changed it), while a preset set to Average Cost Basis computes the tax from the pool average. The German Abgeltungsteuer preset is the case this comes up in most. If you need lot matching for tax as well, clone the preset and change its cost basis method.
Changing Methods
If you change your cost basis method, Capitally will recalculate all historical position unit pairings. This may change your historical gains/losses.
Changing cost basis methods will change them for past years that are already filled!