Average Cost Calculator — Free Online Cost Tool
Calculate the weighted average cost per unit when you have multiple purchases at different prices. Add as many purchase batches as you need to see the true average cost, total spending, and how each purchase contributes to your overall cost basis.
Weighted Average
The average cost per unit is weighted by quantity. Larger purchases at lower prices pull the average down more than small purchases at higher prices.
Average Cost Results
Summary: Across 3 purchases totaling 400 units for $4,500.00, the weighted average cost is $11.25 per unit.
Cost Distribution by Purchase
How to Use the Average Cost Calculator
This average cost calculator computes the weighted average cost per unit from multiple purchases, giving proper weight to larger quantity purchases. It is essential for inventory management, investment portfolio analysis, and any situation where you buy the same item at different prices over time.
- Enter your first purchase. The calculator starts with three sample rows showing different quantities and unit costs. Replace these with your actual purchase data. Enter the quantity of units purchased and the cost per unit for your first batch. The subtotal (quantity multiplied by unit cost) is calculated automatically and shown in the results.
- Add additional purchases. Click the "Add Purchase" button to add rows for each additional purchase event. Each row should represent a separate purchase with potentially different quantities and unit costs. You can add up to 15 rows, which is sufficient for most inventory and investment tracking scenarios.
- Remove unnecessary rows. Click the trash icon next to any row to remove it from the calculation. The minimum is one row, so you always have at least one purchase in the calculation. Removing a row instantly recalculates the weighted average.
- Review the weighted average cost. The primary result is the weighted average cost per unit. This number reflects the true average cost considering both price and quantity. A large purchase at a low price pulls the average down more than a small purchase at a high price, which is exactly how inventory cost should be calculated.
- Analyze the distribution chart. The pie chart shows how your total spending is distributed across purchases. This visualization helps you identify which purchases represent the largest portion of your investment and understand the price variation across your purchase history.
You can use this calculator for any type of multi-batch purchase: inventory restocking, stock accumulation through dollar-cost averaging, raw material procurement, or any situation where the same item is acquired at different prices over time.
Understanding the Weighted Average Cost Formula
The weighted average cost formula accounts for both the quantity and price of each purchase, producing a single cost-per-unit figure that accurately represents your true average acquisition cost. This is the standard method used in inventory accounting and portfolio cost basis calculations.
Weighted Average Cost = Total Cost / Total Quantity
Total Cost = ∑(Quantityi × Unit Costi)
Total Quantity = ∑(Quantityi)
Where each variable represents:
- Quantityi = Number of units in purchase batch i
- Unit Costi = Cost per unit for purchase batch i
- Total Cost = Sum of all purchase subtotals across all batches
- Total Quantity = Sum of all units purchased across all batches
- Weighted Average Cost = The true average cost per unit considering quantity weights
Step-by-Step Calculation Example
A coffee shop owner purchases coffee beans from different suppliers at varying prices. Calculate the weighted average cost per pound:
- Purchase 1: 50 lbs at $8.00/lb = $400.00
- Purchase 2: 120 lbs at $7.20/lb = $864.00
- Purchase 3: 30 lbs at $9.50/lb = $285.00
- Total cost: $400 + $864 + $285 = $1,549.00
- Total quantity: 50 + 120 + 30 = 200 lbs
- Weighted average: $1,549 / 200 = $7.745/lb
Note that the simple average of the three unit costs would be ($8.00 + $7.20 + $9.50) / 3 = $8.23/lb. The weighted average is significantly lower at $7.745/lb because the largest purchase (120 lbs) was at the lowest price ($7.20). The weighted average more accurately reflects the shop's true cost basis and should be used for pricing menu items and calculating cost of goods sold.
Why Simple Average is Wrong
A simple (unweighted) average treats all prices equally regardless of quantity. If you bought 1 unit at $100 and 999 units at $1, a simple average gives ($100 + $1) / 2 = $50.50. The weighted average correctly gives (1 × $100 + 999 × $1) / 1000 = $1.099 per unit. The simple average wildly overstates your actual cost. For any inventory or investment analysis, always use the weighted average when quantities differ across purchase batches.
Practical Average Cost Examples
These scenarios demonstrate how weighted average cost calculations apply to real business and investment situations. Each example shows why accurate average cost matters for decision-making.
E-Commerce Inventory Management
Olivia runs an online store selling phone cases. Over three months, she placed the following orders with her manufacturer: January: 500 cases at $3.20 each ($1,600), February: 800 cases at $2.90 each ($2,320), March: 300 cases at $3.50 each ($1,050). Her total investment is $4,970 for 1,600 cases, yielding a weighted average cost of $3.106 per case. She sells each case for $12.99. Using the correct weighted average, her gross profit per case is $9.884 (76.1% margin). Had she used the most recent cost of $3.50, she would calculate a margin of 73.1%, underestimating her true profitability by 3 percentage points. Accurate cost data leads to better pricing decisions.
Dollar-Cost Averaging in Stock Investing
Thomas invests $1,000 per month in a broad market index fund. Over six months his purchases are: Month 1: $1,000 at $50/share (20 shares), Month 2: $1,000 at $45/share (22.2 shares), Month 3: $1,000 at $40/share (25 shares), Month 4: $1,000 at $38/share (26.3 shares), Month 5: $1,000 at $42/share (23.8 shares), Month 6: $1,000 at $48/share (20.8 shares). Total invested: $6,000 for 138.1 shares. Weighted average cost: $43.45/share. The average price over those months was $43.83. Dollar-cost averaging gave Thomas a slightly lower average cost because he naturally bought more shares at lower prices. At the current price of $48, his gain is ($48 - $43.45) x 138.1 = $627.66, a 10.5% return.
Construction Material Procurement
A building contractor needs lumber for a project and purchases from multiple suppliers at different times as availability varies: Supplier A: 2,000 board feet at $0.85/bf ($1,700), Supplier B: 3,500 board feet at $0.72/bf ($2,520), Supplier C: 1,500 board feet at $0.95/bf ($1,425), Supplier D: 1,000 board feet at $0.78/bf ($780). Total: 8,000 board feet for $6,425, weighted average of $0.803/bf. For the project bid, using the weighted average ensures the contractor prices accurately. Bidding using the highest supplier cost ($0.95) would make the bid uncompetitive. Bidding using the lowest ($0.72) would underestimate costs. The weighted average of $0.803 per board foot represents the true cost and should be the basis for project pricing plus the desired margin.
Average Cost Reference Table
| Scenario | Total Qty | Total Cost | Avg Cost | Simple Avg |
|---|---|---|---|---|
| 100 @ $5 + 200 @ $4 | 300 | $1,300 | $4.33 | $4.50 |
| 50 @ $12 + 150 @ $10 | 200 | $2,100 | $10.50 | $11.00 |
| 500 @ $2 + 100 @ $3 | 600 | $1,300 | $2.17 | $2.50 |
| 1000 @ $0.50 + 200 @ $0.80 | 1,200 | $660 | $0.55 | $0.65 |
| 25 @ $100 + 75 @ $80 | 100 | $8,500 | $85.00 | $90.00 |
| 300 @ $15 + 300 @ $18 + 300 @ $12 | 900 | $13,500 | $15.00 | $15.00 |
Tips and Complete Guide to Average Cost Analysis
Accurate average cost calculation is the foundation of sound inventory management, investment tracking, and business pricing. These strategies help you use average cost data effectively for better financial decisions.
Maintain Detailed Purchase Records
Every purchase should be documented with date, quantity, unit cost, supplier, and any additional costs like shipping or duties. This level of detail allows you to calculate accurate weighted averages at any point in time and supports audit requirements. For inventory businesses, many accounting systems (QuickBooks, Xero, NetSuite) automatically calculate weighted average cost when you record purchases. For investments, your brokerage provides cost basis information. Even if software handles the math, understanding the underlying calculation ensures you can verify accuracy and make informed decisions.
Include All Costs in Your Unit Cost
The unit cost in a weighted average calculation should reflect the total "landed cost" of getting the product to your location. This includes the purchase price, shipping and freight charges, import duties and tariffs, handling fees, and any other costs directly attributable to acquiring the inventory. If you pay $10 per unit but spend $2 per unit on shipping, your true unit cost is $12. Using only the purchase price understates your cost basis, leading to overestimated profit margins and potentially unprofitable pricing decisions.
Recalculate After Significant Purchases
Your weighted average cost changes with every new purchase, but it is especially important to recalculate after large orders. A significant purchase at a higher or lower price than your current average can shift the per-unit cost enough to affect pricing decisions. For example, if your average cost has been $5.00 and you make a large purchase at $6.50, the new average may jump to $5.40. If your selling price was based on the old $5.00 average, your margin just decreased. Set up triggers to review pricing whenever the average cost changes by more than 5%.
Use Average Cost for Consistent Financial Reporting
The weighted average cost method is popular because it smooths out price volatility in your financial reports. Unlike FIFO, which can show dramatic changes in cost of goods sold when prices fluctuate, the weighted average changes gradually. This consistency makes financial statements easier to analyze and compare across periods. For businesses with many similar items purchased frequently (retail, food service, manufacturing), the weighted average method also reduces the administrative burden of tracking individual unit costs through the supply chain.
Common Mistakes to Avoid
- Using simple average instead of weighted average. This is the most common error. A simple average ignores quantity differences and can significantly misrepresent your true cost. Always weight each purchase by its quantity when calculating the average cost per unit.
- Forgetting to include shipping and handling. A $10 item with $2 shipping costs $12 per unit. Excluding shipping from your cost basis means every margin calculation you make will be overstated, and you may price products below true cost without realizing it.
- Not updating the average after new purchases. Your weighted average is only accurate if it includes all purchases. Forgetting to record a purchase or using an outdated average leads to incorrect pricing and inaccurate financial statements.
- Mixing different products in one average. Each distinct product or SKU needs its own weighted average calculation. Combining different products into a single average produces a meaningless number that does not accurately represent the cost of any individual item.
- Ignoring returns and adjustments. When items are returned to a supplier or you receive a price adjustment, update your purchase records. A $500 refund on a 100-unit purchase reduces your effective unit cost by $5.00, which should be reflected in the weighted average.
Frequently Asked Questions
Weighted average cost is a method of calculating the average cost per unit when multiple batches of the same item were purchased at different prices. Unlike a simple average that treats all prices equally, a weighted average gives more influence to larger purchases. If you bought 100 units at $10 and 300 units at $8, the simple average price is $9, but the weighted average is $8.50 because the larger $8 purchase has three times the weight. Use weighted average cost for inventory valuation, stock portfolio cost basis calculations, raw material costing, and any situation where purchase quantities vary across batches. This method is one of the accepted inventory valuation methods under Generally Accepted Accounting Principles (GAAP). Use our <a href="/financial/business/margin-calculator" class="text-primary-600 hover:text-primary-800 underline">margin calculator</a> once you know your average cost to set profitable selling prices.
Average cost, FIFO (First In, First Out), and LIFO (Last In, First Out) are the three primary inventory costing methods in accounting. Average cost assigns the same cost per unit to all items in inventory, regardless of when they were purchased. FIFO assumes the oldest inventory is sold first, so cost of goods sold uses older (typically lower) prices and ending inventory uses newer prices. LIFO assumes the newest inventory is sold first, so cost of goods sold uses the most recent (typically higher) prices. Average cost smooths out price fluctuations and is simpler to maintain. FIFO produces a more accurate balance sheet in inflationary environments. LIFO reduces taxable income during inflation but is not permitted under IFRS. The method you choose affects your reported profits and tax liability, so consult with an accountant to determine which is best for your business.
For stock investments, the average cost basis is the total amount invested divided by the total number of shares owned. If you bought 50 shares at $40 ($2,000), then 30 shares at $55 ($1,650), and 20 shares at $35 ($700), your total investment is $4,350 for 100 shares, making your average cost basis $43.50 per share. This is important for calculating capital gains when you sell. If you sell all 100 shares at $50, your gain is ($50 - $43.50) x 100 = $650. The IRS allows different cost basis methods for securities: specific identification (choose which shares to sell), FIFO, and average cost (only for mutual fund shares and certain ETFs). For individual stocks, you must use specific identification or FIFO. Use our <a href="/financial/investment/roi-calculator" class="text-primary-600 hover:text-primary-800 underline">ROI calculator</a> to measure your overall investment returns.
Under the weighted average cost method, selling items does not change the average cost per unit for remaining inventory. The average cost is recalculated only when new purchases are made at different prices. For example, if your weighted average is $10 per unit with 500 units in stock and you sell 200 units, the remaining 300 units are still valued at $10 each. However, if you then purchase 100 more units at $12, the new weighted average becomes: (300 x $10 + 100 x $12) / 400 = $10.50. This "moving average" approach recalculates after each purchase, providing a constantly updated cost basis. Some systems use a "periodic average" that recalculates at fixed intervals instead.
Dollar-cost averaging (DCA) is an investment strategy where you invest a fixed dollar amount at regular intervals regardless of price. Over time, this automatically produces a lower average cost per share than the average price, because you buy more shares when prices are low and fewer when prices are high. For example, investing $500 monthly in a stock priced at $50 (10 shares), then $25 (20 shares), then $50 (10 shares) gives you 40 shares for $1,500 at an average cost of $37.50, even though the average price was $41.67. This mathematical advantage makes DCA popular for long-term investors who want to reduce the impact of market volatility on their average entry cost. Track your DCA results by entering each purchase into this calculator.
Yes, this calculator works with any currency since it operates purely on quantities and costs. The unit cost field accepts any numerical value, and you can interpret the results in whatever currency your purchases were made in. If you have purchases in multiple currencies, convert all amounts to a single currency first using the exchange rate at the time of each purchase. This is important for accurate cost basis calculations because exchange rates fluctuate. For international inventory, using the exchange rate at the purchase date (historical rate) is the standard accounting practice. Note that exchange rate gains or losses may create additional tax implications for cross-border purchases.
Adding more purchase rows lets you include additional batches in the weighted average calculation. Each row represents a separate purchase event with its own quantity and unit cost. The calculator dynamically recalculates the weighted average as you add, remove, or modify rows. You can add up to 15 separate purchases, which covers most practical scenarios. If you have more than 15 batches, combine smaller purchases at similar prices into single entries. The more purchases you include, the more accurate your weighted average becomes, especially when prices fluctuate significantly across purchase dates. Use our <a href="/financial/business/profit-calculator" class="text-primary-600 hover:text-primary-800 underline">profit calculator</a> to determine your overall profitability once you know your average cost.
Related Calculators
Margin Calculator
Calculate profit margin and markup from cost and selling price
Profit Calculator
Calculate gross and net profit with full revenue breakdown
Discount Calculator
Calculate savings from single and stacked discounts
Percent Off Calculator
Quickly find sale prices with preset discount levels
ROI Calculator
Calculate return on investment for any asset or project
Salary Calculator
Calculate net take-home pay after taxes and deductions
Disclaimer: This calculator is for informational purposes only and does not constitute financial advice. Consult a qualified financial advisor before making financial decisions.
Last updated: February 23, 2026