Stock portfolio tracker

Buys, sells, cost basis, gains and dividends

🔒 Your transactions stay in this browser: nothing is sent over the Internet. Remember to export a backup.

Summary

Current value——
Cost basis (avg. cost × quantity)—purchase fees included
Unrealized gain/loss——
Realized gains/losses——
Dividends received——
Total return—unrealized + realized + dividends

New transaction

Holdings Enter the current price of each security

SecurityAccountQuantityAvg. costCurrent priceValueUnrealized gain/loss%Weight

Realized gains and losses

DateSecurityAccountQuantityUnit costSale priceFeesCost basisNet proceedsGain/loss

Yearly summary

YearAccountGainsLossesNetDividendsEstimated tax*
%

Indicative estimate: the rate is applied to the positive net gain and to gross dividends of each taxable account. Accounts whose name contains ISA, IRA, Roth, 401k, TFSA, RRSP or SIPP are treated as tax-free. Real rules vary by country (holding period, allowances, loss carry-forward): set the rate that matches your situation.

Transaction history

DateTypeSecurityAccountQuantityPrice / amountFeesTotal

Portfolio tracker guide

What is this tool for?

It replaces the spreadsheet you use to follow your stocks, ETFs and funds. Record every purchase, sale and dividend, and the tool works out your average cost per share, the unrealized gain or loss of each holding, the realized gain or loss on every sale and a yearly summary that helps with your tax return.

How to use it

  1. Buy: date, account (brokerage, IRA, ISA…), ticker, quantity, price paid and fees. Buying more of a security you already hold updates its average cost.
  2. Sell: pick the security; the tool shows how many shares you hold and their cost, then calculates the gain or loss as soon as the sale is recorded.
  3. Dividend: enter the gross amount and, under “Tax withheld”, any withholding tax.
  4. Current price: type it in the holdings table to get the value and the unrealized gain. It is remembered.

How is the cost basis calculated?

Two methods are available under the yearly summary. With FIFO (first in, first out, the default rule for shares in the United States), the shares you bought first are considered sold first. With average cost (used in the UK through the “Section 104 pool”, and in France), every share has the same cost:

Average cost = (total purchase amounts + fees) ÷ shares held

Gain/loss = (quantity × sale price − fees) − cost of the shares sold

Example: buy 10 shares at $50, then 10 at $70 (no fees), then sell 5 at $80 with a $2 fee. With FIFO the 5 shares sold cost $50 each: 5 × 80 − 2 − 5 × 50 = $148. With average cost they cost $60 each: 5 × 80 − 2 − 5 × 60 = $98. Purchase fees are always included in the cost.

Each account is tracked separately, so the same stock held in a brokerage account and in an IRA has two distinct cost bases.

Your questions

Where is my data stored?

Only in your browser (local storage). It is never sent to a server. The flip side: clearing your browser data or switching device makes it disappear, so use Export regularly and Import to restore or move it.

Can I import transactions from a spreadsheet?

Yes, with a CSV file whose first line contains the columns date,type,account,ticker,name,quantity,price,fees (comma or semicolon separator, date as YYYY-MM-DD or MM/DD/YYYY, type = buy, sell or dividend). The CSV button exports exactly this format.

Are prices updated automatically?

No. To stay free, private and sign-up-free, the tool does not connect to any market data service. Enter the prices shown by your broker; the date of your last update is displayed.

Can I use this for my tax return?

As a cross-check only. The official figures are those on the statement from your broker (Form 1099-B in the United States). The tax rate is editable because it depends on your country, your income and how long you held the shares.

What about foreign currencies?

Choose the portfolio currency at the top of the summary, then enter every amount in that currency, converting foreign trades at the rate of the trade date. The currency converter can help.

Official sources