Enter the number of shares bought in this transaction.
Enter your current WAP before this transaction (if any).
Enter your total number of shares held before this transaction (if any).
Your Results
The Weighted Average Price (WAP) is calculated by summing the total cost of all purchases (including previous holdings) and dividing by the total number of shares owned.
Formula: WAP = (Total Cost Basis) / (Total Quantity)
Where:
Total Cost Basis = (Current Total Quantity * Current WAP) + (Quantity Purchased * Purchase Price)
Total Quantity = Current Total Quantity + Quantity Purchased
Transaction Summary Table
Transaction Details
Item
Value
Purchase Price Per Share
Quantity Purchased
Transaction Cost
Current WAP (Pre-Transaction)
Current Quantity (Pre-Transaction)
New Total Quantity
New Total Cost Basis
New Weighted Average Price (WAP)
WAP Over Time Visualization
Enter purchase details to see your WAP results.
What is Weighted Average Price (WAP)?
The Weighted Average Price (WAP), also known as the average cost basis, is a crucial metric for investors and traders to understand the average price at which they've acquired a particular stock over multiple transactions. It's not simply the average of all purchase prices; instead, it gives more weight to larger purchases. Calculating your WAP is essential for accurate performance tracking, tax reporting, and making informed decisions about when to buy more or sell shares.
Who should use it?
Any investor who buys or sells the same stock multiple times is a prime candidate for calculating and tracking their Weighted Average Price. This includes:
Long-term investors who dollar-cost average into a position.
Traders who frequently re-enter a stock after selling portions of their position.
Anyone managing a portfolio where cost basis tracking is important for tax purposes.
Common Misconceptions:
Misconception 1: WAP is the same as the simple average of purchase prices. This is incorrect. WAP accounts for the *quantity* of shares bought at each price. A large purchase at a lower price will pull the WAP down more significantly than a small purchase at the same lower price.
Misconception 2: WAP is irrelevant if I only buy once. While technically true for a single purchase, understanding WAP becomes critical the moment you make a second transaction. It's the basis for tracking your cumulative cost.
Misconception 3: WAP is always the current market price. WAP is your *internal* average cost. The market price is external and fluctuates independently. Your WAP can be higher or lower than the current market price.
Weighted Average Price (WAP) Formula and Mathematical Explanation
The calculation of the Weighted Average Price is straightforward but requires careful tracking of all transactions for a specific stock. The core idea is to find the total amount of money spent on the stock and divide it by the total number of shares owned.
Step-by-step derivation:
Calculate the cost of each transaction: For every purchase, multiply the price per share by the number of shares bought.
Sum the costs of all transactions: Add up the cost of the current purchase with the total cost basis of all previous holdings.
Sum the quantities of all shares: Add the quantity of shares from the current purchase to the total quantity of shares already held.
Divide total cost by total quantity: The result is your new Weighted Average Price.
Formula: New WAP = ( (Current Total Quantity * Current WAP) + (Quantity Purchased * Purchase Price) ) / (Current Total Quantity + Quantity Purchased)
Alternatively, if calculating from scratch without prior WAP:
WAP = (Sum of (Price_i * Quantity_i) for all transactions i) / (Sum of Quantity_i for all transactions i)
Variable Explanations:
WAP Calculation Variables
Variable
Meaning
Unit
Typical Range
Purchase Price
The price paid per share for a new batch of stock.
Currency (e.g., USD, EUR)
> 0
Quantity Purchased
The number of shares bought in a new transaction.
Shares
> 0
Current WAP
The weighted average price of the stock held *before* the current transaction. If this is the first purchase, this value is effectively 0 or not used in the primary calculation.
Currency (e.g., USD, EUR)
> 0
Current Total Quantity
The total number of shares held *before* the current transaction. If this is the first purchase, this value is 0.
Shares
≥ 0
Total Cost Basis
The aggregate cost of all shares owned up to a certain point. It's calculated as (Current Total Quantity * Current WAP).
Currency (e.g., USD, EUR)
> 0
New Total Quantity
The total number of shares owned *after* the current transaction.
Shares
> 0
New WAP
The updated weighted average price after accounting for the latest transaction. This is the primary output.
Currency (e.g., USD, EUR)
> 0
Practical Examples (Real-World Use Cases)
Understanding WAP becomes clearer with practical examples. Let's look at two scenarios:
Example 1: Dollar-Cost Averaging
An investor, Sarah, believes in a company and decides to build a position in Stock XYZ over time using dollar-cost averaging.
Initial State: Sarah owns 0 shares. Her Current WAP is effectively $0, and Current Total Quantity is 0.
Transaction 1: Sarah buys 100 shares at $50.00 per share.
After Transaction 2, Sarah's WAP is now $43.33. Notice how the lower purchase price pulled the average down significantly due to the larger quantity.
Financial Interpretation: Sarah successfully reduced her average cost basis by buying more shares when the price was lower. This information is vital for understanding potential profit/loss and for tax reporting.
Example 2: Trading and Re-entry
John is a trader who owns Stock ABC. He decides to sell part of his holdings but plans to re-enter later.
Initial State: John owns 500 shares with a WAP of $100.00.
Current WAP = $100.00
Current Total Quantity = 500
Current Total Cost Basis = 500 * $100.00 = $50,000.00
Transaction 1 (Sale): John sells 200 shares at $110.00 per share. For WAP calculation purposes, sales don't change the WAP directly but reduce the quantity held. The cost basis for tax purposes is calculated using the WAP *at the time of sale*. The WAP remains $100.00 after the sale, but the quantity is now 300.
Quantity Sold = 200
New Total Quantity = 500 – 200 = 300 shares
WAP remains $100.00 (based on previous holdings)
Transaction 2 (Re-entry): A week later, John buys 150 shares at $95.00 per share.
After Transaction 2, John's WAP is $98.33. He has effectively lowered his average cost basis by buying back in at a lower price than his previous average.
Financial Interpretation: John's actions demonstrate active trading strategy. He locked in a profit on the sale and re-entered the stock at a lower price, reducing his overall cost basis and potentially increasing his future profit margin.
How to Use This Weighted Average Price Calculator
Our free Weighted Average Price (WAP) calculator is designed for simplicity and speed. Follow these steps to get your updated average cost basis instantly:
Enter Current Holdings (If Applicable): If you already own shares of the stock, input your Current Weighted Average Price (WAP) and the Current Total Quantity you hold. If this is your very first purchase of this stock, you can leave these fields at 0.
Enter New Purchase Details: Input the exact Purchase Price per share for your latest transaction and the Quantity Purchased in that specific trade.
Calculate: Click the "Calculate WAP" button.
Review Results: The calculator will instantly display:
New Weighted Average Price (WAP): Your updated average cost basis per share. This is the primary result.
New Total Quantity: The total number of shares you now own.
New Total Cost Basis: The total amount invested in this stock after the latest transaction.
Transaction Cost: The total cost of the shares purchased in the most recent transaction (Quantity Purchased * Purchase Price).
You will also see a summary table detailing all inputs and outputs, and a chart visualizing the cost basis and quantity change.
Copy Results: Use the "Copy Results" button to quickly save or share your calculated WAP and related data.
Reset: If you need to start over or calculate for a different stock, click the "Reset" button to clear all fields.
Decision-Making Guidance: Your updated WAP is a critical data point. If the current market price is significantly above your WAP, you have unrealized gains. If it's below, you have unrealized losses. This information helps you decide whether to hold, sell, or buy more shares. For tax purposes, maintaining an accurate WAP is crucial for calculating capital gains or losses upon selling.
Key Factors That Affect Weighted Average Price Results
Several factors influence your calculated Weighted Average Price, impacting its accuracy and your investment strategy. Understanding these is key to effective portfolio management:
Transaction Timing and Frequency: The more frequently you trade a stock, especially buying and selling, the more often your WAP will change. Buying more shares at lower prices reduces your WAP, while buying at higher prices increases it. Selling shares reduces your quantity but doesn't alter the WAP of the remaining shares until a new purchase is made.
Quantity of Shares in Each Transaction: As the "weighted" in WAP suggests, the number of shares in each transaction has a significant impact. A large purchase at a favorable price will have a greater effect on moving your WAP than a small purchase at the same price.
Price Volatility: Stocks with high price volatility present more opportunities to adjust your WAP. Buying during dips can significantly lower your average cost, while buying during run-ups increases it. This volatility is what traders often exploit to manage their cost basis.
Brokerage Fees and Commissions: While often small, any fees or commissions associated with buying shares *must* be included in the 'Purchase Price' for an accurate cost basis calculation. If your broker charges a fee per trade, add that fee to the total cost of shares before dividing by the quantity to get the true effective purchase price per share. Our calculator assumes the 'Purchase Price' is the final effective price including any such costs for simplicity, but it's vital to account for them in real-world scenarios.
Dividends Reinvestment Plans (DRIPs): If you participate in a DRIP, your dividends are used to purchase additional shares, often at a discount. These automatic purchases increase your quantity and affect your WAP. The price used for these reinvested shares, along with any associated (usually minimal) fees, must be incorporated into your WAP calculation.
Stock Splits and Reverse Splits: These corporate actions change the number of shares you own and the price per share without changing your total cost basis or WAP *at the moment of the split*. For example, a 2-for-1 stock split means you double your shares, but your WAP is halved. If you bought 100 shares at $10 (WAP $10), after a 2-for-1 split, you'd have 200 shares with a WAP of $5. It's crucial to adjust your records accordingly. Our calculator is designed for direct purchase transactions and doesn't automatically account for splits, so manual adjustment of your records is needed.
Tax Implications (Capital Gains/Losses): While not directly affecting the WAP calculation itself, your WAP is fundamental to calculating capital gains or losses when you sell shares. The IRS (in the US) and similar tax authorities globally require accurate cost basis tracking for tax reporting. Selling specific lots of shares requires knowing their cost basis, which is often derived from your WAP calculations.
Frequently Asked Questions (FAQ)
Q1: What is the difference between WAP and market price?
The market price is the current trading price of a stock on an exchange. Your Weighted Average Price (WAP) is your *internal* average cost for the shares you hold, based on your purchase history. Your WAP can be higher, lower, or equal to the market price.
Q2: Do I need to include transaction fees in my WAP calculation?
Yes, for accurate cost basis tracking, especially for tax purposes, you should include all brokerage fees and commissions paid when purchasing shares. This increases your effective purchase price per share. Our calculator simplifies by asking for the final effective price, but be mindful of fees in your actual records.
Q3: How do I handle selling shares with WAP?
When you sell shares, you reduce your total quantity. Your WAP doesn't change based on the sale itself, but it applies to the remaining shares. For tax purposes, you'll typically calculate the capital gain or loss based on the difference between the selling price and the cost basis (often derived from your WAP) of the shares sold. You can choose different cost basis methods (like FIFO – First-In, First-Out) if your broker supports it.
Q4: What if I buy shares at different currencies?
If you trade stocks in multiple currencies, you'll need to convert all purchase costs to a single base currency (e.g., your home currency) using the exchange rate at the time of each transaction before calculating the WAP. This ensures a consistent calculation.
Q5: Does WAP apply to options or other derivatives?
The concept of average cost basis is most commonly applied to stocks and ETFs. For options, the strategy revolves around premium paid/received, strike prices, and expiration, which are distinct from WAP calculations for equity.
Q6: How often should I update my WAP?
You should update your WAP every time you make a new purchase of the stock. It's good practice to review your total holdings and WAP periodically, especially before making new investment decisions or during tax season.
Q7: What happens if I receive fractional shares from a dividend reinvestment?
Fractional shares acquired through DRIPs should be included in your total quantity and their cost (including any fees) added to your total cost basis. They are typically bought at the prevailing market price at the time of reinvestment.
Q8: Can I track WAP for multiple stocks using this calculator?
Yes! You can use this calculator independently for each stock you own. Simply enter the purchase details for Stock A, calculate, note the WAP, reset, and then enter the details for Stock B, and so on. Maintain separate records for each stock.