Cost Basis Calculator
Input Parameters
Computed Results
The cost basis calculator helps investors determine the average price paid per share across multiple purchases. By entering the number of shares and the price per share for up to five separate transactions, you can quickly calculate your total accumulated shares, total investment cost, and average cost per share.
This calculator is for informational purposes only and does not constitute financial, investment, or tax advice.
Practical Use Cases
Investors often buy shares of the same asset at different times and at different prices, a strategy sometimes referred to as dollar-cost averaging. Tracking the overall cost basis is necessary for understanding the total amount invested and the average price paid per share. This calculator allows you to input up to five distinct purchase lots to find the weighted average cost of your position. This mathematical baseline is useful for evaluating current portfolio values against the original purchase costs.
Formula & Explanation
The calculator determines the average cost per share by dividing the total cost of all purchases by the total number of shares acquired. The formulas used are:
The total cost represents your total cost basis for the entered lots. The average cost per share is weighted by the number of shares bought at each price point, ensuring larger purchases have a proportionally greater impact on the final average.
Verified Scenario Walkthroughs
Here are examples of how the calculator processes different purchasing scenarios based on its formula:
Three Tiered Accumulation Lots
If you make three separate purchases of an asset as the price changes:
- Purchase 1: 100 shares at $20.00 per share
- Purchase 2: 200 shares at $25.00 per share
- Purchase 3: 150 shares at $30.00 per share
The calculator determines the total shares are 450 and the total cost is $11,500. Dividing the total cost by the total shares results in an average cost per share of $25.56.
Maximum Capacity Usage
If you utilize all five input lots with equal share amounts but increasing prices:
- Purchase 1: 1,000 shares at $10.00
- Purchase 2: 1,000 shares at $20.00
- Purchase 3: 1,000 shares at $30.00
- Purchase 4: 1,000 shares at $40.00
- Purchase 5: 1,000 shares at $50.00
The total number of shares is 5,000, and the total cost basis is $150,000. The resulting average cost per share is exactly $30.00.
How to Use the Calculator
Follow these steps to calculate your average share price and total cost basis:
- Enter the number of shares acquired in your first transaction into the Purchase 1 - Shares field.
- Enter the price paid per share for that transaction into the Purchase 1 - Price per Share field.
- Repeat this process for up to four additional purchase lots using the subsequent fields. Leave unused fields at zero.
- Review the calculated results, which will display your average cost per share, total accumulated shares, and total cost basis.
Inputs & Outputs Table
| Field Name | Type | Description |
|---|---|---|
| Purchase 1-5 - Shares | Input | Number of shares purchased in the respective lot. |
| Purchase 1-5 - Price per Share | Input | Purchase price per share for the respective lot. |
| Average Cost per Share | Output | The weighted average price paid for all entered shares. |
| Total Shares | Output | The sum of all shares entered across the five lots. |
| Total Cost Basis | Output | The total monetary amount spent on all entered shares. |
Frequently Asked Questions
What is a cost basis?
Cost basis is the original value or purchase price of an asset. In the context of this calculator, it represents the total amount of money spent to acquire the entered shares.
How does the calculator handle empty fields?
Any purchase lot fields left blank or set to zero are ignored in the calculation. The calculator only sums the shares and costs for the lots where both a share count and a price are provided.