Track US stock returns
Average cost and profit from stocks
Calculate average cost from your trades, or separate share-price and exchange-rate effects on profit and loss.
Accuracy warning: Calculation issues have been found with very small or large values, and malformed CSV imports may produce incorrect data or results. Other values may also be affected. No input range has been proven safe. Independently verify results against broker records or another method before relying on them for trading, accounting, or tax.
When enabled, records and inputs are saved automatically only in this browser, without server transmission. Others using the same browser may see them, and clearing site data may remove them.
Disabling or deleting saved data stops retention and removes the stored copy while keeping data on the current page. Clear data resets the form and lists, saving the reset state if retention remains enabled.
Saving is not enabled
Average cost of remaining shares
—
Average cost per share
- Number of shares remaining
- —
- Total cost of remaining shares
- —
- Realized profit or loss
- —
Trade records
Transaction history
Calculate in the order in which items are added.
| Category | Number of shares | Price per share | Fee | Total received or paid | Manage |
|---|
Estimated total profit or loss
—
Rate of return —
- Results from changes in stock prices
- —
- Effects of currency changes
- —
- Effects of stock prices and currency values together
- —
- Total fees
- —
Things to know
Average cost follows the transactions you enter, with the average cost basis reduced when shares are sold. Price and currency attribution includes an interaction effect because both can change together. These figures are not an official tax cost basis.
Both form fields and CSV accept decimal numbers, including 1e-6 (exponent -36 to 36; at most 80 characters per token). Numeric fields cannot be blank. Each input allows at most 12 integer and 12 fractional digits after normalization (leading zeros do not count). A ledger holds up to 100 trades. Calculations keep exact rational values and round only for display to 12 decimal places, with halfway values rounded away from zero. Nonzero values below the display quantum show < or -<. Individually rounded outputs may not add up exactly. CSV is limited to 40,000 characters (file size up to 160 KB) and retains entered decimal text but not the currency. Older saved data is read from stored numbers; digits already lost cannot be recovered. Saved entries outside the limits are not restored and show an error. A failed CSV import leaves the ledger unchanged.
CSV files and all data are processed in the browser without uploading, and stored locally only when retention is enabled