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
- Matching specific lots for wash sale management
- 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
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.
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
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.
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!