Portfolio P/L Calculator
Paste positions from a spreadsheet and get per-position profit/loss, return percentage, break-even prices, fees, taxes, and portfolio totals.
About this tool
Paste positions from a spreadsheet or broker export and calculate portfolio profit and loss locally. Each row is name, quantity, entry price, current price with optional flat fees, dividends, days held, and a long or short side. The report shows cost basis, market value, net P/L, return percentage, fee-adjusted break-even prices, winners/losers, and optional tax estimates.
Worked example:
AAPL, 50, 150, 187.50, 9.99
TSLA, 10, 250, 220
With a 15% tax rate, the report nets the winning and losing positions together before estimating tax. A negative quantity or a trailing short marks a short position; otherwise rows use the selected default side.
Limits and edge cases: the tool does not fetch live market prices, value currencies, or provide investment advice. It reads the prices you supply, accepts up to 5,000 positions, rejects negative prices, treats flat fees as costs, and uses the optional tax rate only on a positive portfolio-level net gain.
FAQ
What columns can I paste?
Use name, quantity, entry price, current price as the first four columns. Optional trailing columns are flat fees, dividends or income collected, days held, and a long or short side word. Tab-separated rows work too, which is useful when prices contain thousands separators.
Does it download current prices?
No. This is an offline calculator: every current price comes from the text you paste. That keeps results deterministic and avoids sending portfolio data to a price API.
How are fees and taxes handled?
A row-level flat fee is subtracted from that position. The percent fee setting is applied to both the entry notional and the current notional for every row. The tax estimate is applied only after gains and losses are netted at the portfolio level, and only when the net result is positive.
Can I calculate short positions?
Yes. Add short to the end of a row, choose short as the default side, or enter a negative quantity. Short rows gain when the current price is lower than the entry price, and their break-even price includes fees just like long rows.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool portfolio-pnl "Name, Quantity, Entry, Current, Fees, Dividends, Days, Side
AAPL, 50, 150, 187.50, 9.99
TSLA, 10, 250, 220
GME, 100, 40, 25, 5, 0, 60, short"New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/portfolio-pnl/?positions=Name%2C%20Quantity%2C%20Entry%2C%20Current%2C%20Fees%2C%20Dividends%2C%20Days%2C%20Side%0AAAPL%2C%2050%2C%20150%2C%20187.50%2C%209.99%0ATSLA%2C%2010%2C%20250%2C%20220%0AGME%2C%20100%2C%2040%2C%2025%2C%205%2C%200%2C%2060%2C%20short&side=long&fee_percent=0&tax_rate=0&sort=input¤cy=%24Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
