portfolios.tools

Dollar Cost Average Calculator

Calculate weighted average cost per share from entered purchases. Compare the resulting share count with a lump sum counterfactual using the first input row's price.

Current price per share

This optional price values the accumulated shares at one entered price. A zero price represents a full loss. The price is not saved.

Purchase summary

Loading saved purchase details…

Purchase rows

Use one currency for invested amounts and prices. Prices are per share. The calculator does not adjust for stock splits. The currency symbol follows the page locale. It only formats the number and does not convert the entered currency. Purchase prices are not saved. Reenter them after reopening the page.

Loading saved purchase details…

How it works

Add each purchase with its calendar date, invested amount, and price per share. Use the same currency for every amount and price, and keep prices on a consistent share basis. The calculator does not adjust for stock splits. Dates are recorded for reference, and rows stay in their entered order.

The calculator divides each amount by its purchase price to find shares, then adds invested amounts and shares. Weighted average cost is total invested divided by total shares. Simple average price is the unweighted mean of the purchase prices.

The lump sum counterfactual uses the same total cash at the first valid input row's purchase price. It assumes that cash was available at the start. The displayed difference compares share counts only and does not select a preferred strategy.

Enter an optional current price to calculate current value, total gain or loss, and simple total return. These use the full history and current price, without annualization. The current and purchase prices are not stored. Valid dates and invested amounts may be saved in browser storage when available.

Step by step

  1. Enter a date, amount, and price per share for each purchase.
  2. Review total invested, shares, weighted cost, and simple average price.
  3. Compare the share counts, then optionally enter a current price for a simple valuation.

Worked example

Enter two purchases in the same currency: on 2025-02-01, invest 100 at a price of 10 per share; on 2025-01-01, invest 100 at a price of 20 per share. Enter a current price of 16.

The purchases acquire 15 shares for 200 total, so weighted average cost is 13.333333 per share and the simple mean of purchase prices is 15. The first input row sets the lump sum price at 10, producing 20 shares. The share count difference is −25%. At the entered current price, the purchase path is worth 240, for a simple total gain of 40 or 20%. The lump sum counterfactual is worth 320.

When to use this calculator

Use this calculator to total entered purchase amounts and shares, compare weighted cost with a simple average price, or describe a specific purchase history against a lump sum counterfactual.

Check the dates, amounts, prices, currency, and share basis before interpreting results. Use other methods for annualized returns, taxes, fees, or investment strategy decisions.

Common interpretation errors

Do not treat the share count comparison as a strategy recommendation. It describes the entered prices and assumes all cash was available at the first input row's price.

Do not read simple total return as an annualized result. Check that purchase amounts, purchase prices, and the optional current price use the same currency and share basis.

Calculation method

Shares for purchase i = amount investedᵢ / price per shareᵢ

Total shares = Σ shares for each purchase

Total invested = Σ amounts invested

Weighted average cost per share = total invested / total shares

Simple average price = Σ purchase prices / number of purchases

Lump sum shares = total invested / price in the first input row

Share count difference = (purchase path shares / lump sum shares − 1) × 100

Current value = total shares × current price

Total gain = current value − total invested

Simple total return = total gain / total invested × 100

Every started purchase row must contain a valid calendar date, a positive finite amount, and a positive finite price per share. The dates are for records and do not determine the row order. The lump sum uses the first valid input row, not the earliest date. No result is rounded before display. Unsupported numeric ranges return an error.

Assumptions and limits

The calculator uses the entered purchase rows and does not fetch historical or current prices. It assumes all amounts and prices use one currency and consistent share basis. Dates do not sort rows; the first input row sets the lump sum reference price. The counterfactual assumes all cash was available at that price and does not include waiting cash yield, fees, taxes, or reinvestments. Current gain and return are simple totals, not money weighted, time weighted, or annualized returns. They do not predict future performance or recommend a strategy. Invalid rows are not skipped, and unsupported numeric results are withheld.

Key terms

Weighted average cost per share
Total amount invested divided by the total fractional shares acquired from the entered purchase rows.
Simple average price
The arithmetic mean of purchase prices, with each valid purchase price weighted equally regardless of amount invested.
Lump sum counterfactual
The shares that the same total cash would buy at the price in the first valid input row. It assumes all cash was available at that time.

Related tools

The Compound Interest Calculator models a dated growth assumption. The Portfolio Rebalancer models target weights. Use the Capital Gains Holding Period Calculator for a separate holding period question. Each tool uses different inputs and answers a different question.

These tools do not share purchase history. Enter matching assumptions separately when comparing results.

FAQ

What inputs does the calculator use?

Enter the date, amount invested, and purchase price per share for each transaction. Every started row must be complete and valid. Dates are recorded but do not sort rows or change the calculation order. The first valid input row supplies the reference price for the lump sum counterfactual.

How is average cost different from simple average price?

For each purchase, shares equal amount invested divided by price per share. Weighted average cost equals total amount invested divided by total shares. The simple average is the unweighted arithmetic mean of the entered prices, so it can differ from the weighted cost.

What does the lump sum comparison mean?

It compares the shares from the entered purchases with the shares that the same total cash would buy at the first input row's price. A positive percentage means the entered path acquired more shares; a negative percentage means the counterfactual acquired more. It is a share count comparison, not a recommendation or a comparison of annualized returns.

Does this comparison show which strategy is better?

No. The counterfactual assumes all of the same cash was available at the start and used at the first input row's price. It does not model cash yield while waiting, fees, taxes, reinvestments, or a separate investment schedule. Results do not identify a better strategy.

How are current value and return calculated?

When a current price is entered, current value equals accumulated shares times that price. Gain is current value minus total invested, and simple total return is gain divided by total invested. It is not money weighted return, time weighted return, or an annualized result. A current price of zero represents a full loss.

Related tools

The compound interest calculator models a growth rate over time. The portfolio rebalancing tool models target weights. The capital gains holding period tool answers a timing question about a position. None shares this calculator's purchase rows.