What is average cost basis for stocks?
Average cost basis is the weighted average price you paid per share across multiple stock purchases. Investors use it to track total position cost, estimate unrealized gains or losses, and simplify tax reporting when using the average cost method where permitted.
Compare with the dollar cost averaging calculatorfor planned recurring investments. To estimate capital gains tax on a sale, use the capital gains calculator. To review overall portfolio performance, try the rate of return calculator.
Weighted average cost formula
Total cost equals the sum of each purchase (shares times price per share). Average cost per share equals total cost divided by total shares. Unrealized gain or loss equals current market value minus total cost.
Worked example
You buy 100 shares at $50 and later 50 shares at $40. Total cost is ($50 times 100) plus ($40 times 50), which equals $7,000. Total shares are 150. Average cost per share is $7,000 divided by 150, or $46.67. If the current market price is $55, market value is $8,250 and unrealized gain is $1,250.
Average cost vs FIFO
Average cost blends all purchases into one per-share figure. FIFO (first in, first out) matches sales against the oldest lots first. Tax treatment depends on your jurisdiction and broker reporting. Consult a tax professional before choosing a cost basis method for actual filings.
Frequently asked questions
Does average cost include trading commissions?
Can I add more than two purchases?
How is unrealized gain calculated?
Is average cost the same as dollar-cost averaging?
Are my purchase details stored?
Resources and references
The formulas and methods in this calculator were checked against these independent sources.