How Exent worksGuide

How Do I Track Cost Basis and P&L Across Several Buys?

Exent keeps one average cost per holding, updates it every time you add shares, and turns it into unrealized and realized profit and loss. Here is how each number is worked out, what happens on a sale or a stock split, and where the method stops.

Published Updated 4 min readHow we research

Key takeaways

  • Exent tracks one average cost per holding. Each new buy is blended in by share count, and P&L is (current price − average cost) × shares, before fees and taxes.
  • You can type the average cost, give only a purchase date (Exent uses that day’s closing price), or let it be read from a screenshot or statement that shows it.
  • When you sell, realized P&L is (sale price − average cost) × shares sold. Exent sums it for this year, the past 12 months and all time.
  • A stock split multiplies your shares and divides your average cost by the split ratio, so your cost basis and P&L do not change.
  • Cost is optional. A holding without one still counts in every risk check; only its P&L shows as a dash.

How do I track cost basis and P&L across several buys?

Keep one running average cost per holding and update it each time you buy. That is the average‑cost method, and it is what Exent uses. Your cost basis is shares × average cost. Your unrealized P&L is the gap between today’s value and that basis.

When you add shares to a holding you already own, Exent blends the two lots by share count. Ten shares at $100 plus ten at $120 become twenty shares at $110. The same happens when you upload a new screenshot into an existing portfolio: a position that appears again is merged, and its cost is re‑averaged rather than overwritten.

Where does the average cost come from?

There are four ways a holding gets a cost, and the app keeps track of which one applies.

You provideWhat Exent does
An average cost per shareUses it as is (entered in US dollars per unit)
A screenshot or statement with an average cost columnReads the cost; it never guesses one from the current price
Only a purchase dateUses that day’s closing price (or the last trading day before it)
New shares with no pricePrices them at that day’s market price and marks the cost as estimated

The portfolio overview has an “Add purchase prices” step that lists every holding still missing a cost, largest first. Both fields are optional, so you can fill in what you know and leave the rest. The overview also shows how much of your portfolio’s value has a cost on file, so a partial P&L is never presented as the whole picture.

A worked example: two buys, a sale and a split

Illustrative. One stock, prices in US dollars, no fees.

StepSharesAverage costCost basisP&L
Buy 10 at $10010$100$1,000—
Buy 10 more at $12020$110$2,200—
Price is now $13020$110$2,200+$400 unrealized (+18.2%)
Sell 5 at $13015$110$1,650+$100 realized; +$300 unrealized
2‑for‑1 split (price now $65)30$55$1,650+$300 unrealized, unchanged
  • Buy 10 at $100
    Shares
    10
    Average cost
    $100
    Cost basis
    $1,000
    P&L
    —
  • Buy 10 more at $120
    Shares
    20
    Average cost
    $110
    Cost basis
    $2,200
    P&L
    —
  • Price is now $130
    Shares
    20
    Average cost
    $110
    Cost basis
    $2,200
    P&L
    +$400 unrealized (+18.2%)
  • Sell 5 at $130
    Shares
    15
    Average cost
    $110
    Cost basis
    $1,650
    P&L
    +$100 realized; +$300 unrealized
  • 2‑for‑1 split (price now $65)
    Shares
    30
    Average cost
    $55
    Cost basis
    $1,650
    P&L
    +$300 unrealized, unchanged

Note what the sale does not do: it leaves the average cost of the remaining shares at $110. Under the average‑cost method, selling only moves profit from the unrealized column to the realized one. The difference between the two columns is explained in realized vs unrealized gains.

What happens to P&L when I sell?

A sale records realized P&L of (sale price − average cost) × shares sold. You can enter the sale price; if you leave it out, Exent uses the market price at the time. Reducing a position’s share count or removing a holding as sold both count as sales. Removing a row without marking it sold just deletes it and records no gain or loss.

Every buy, sell, import and split lands in the portfolio’s transaction history. The overview sums realized P&L for the year to date, the past 12 months and all time. A sale of a holding with no cost on file is listed but adds nothing to realized P&L, because there is nothing honest to subtract.

How are stock splits handled?

A split changes the share count and the per‑share cost, never the money you put in. In a 10‑for‑1 split, shares are multiplied by 10 and the average cost is divided by 10. Exent applies that adjustment to holdings it tracks and records it as a split row in the transaction history. Purchase‑date lookups use split‑adjusted prices, so a pre‑split date is still comparable with today’s price. More on the mechanics in how stock splits affect cost basis.

Can I use these numbers for my taxes?

No. They are for tracking how your positions are doing, and they are before fees and taxes. Tax rules for basis can differ from a simple average. In the US, IRS Publication 551 (revised December 2025) says that when you cannot identify which shares you sold, the basis is that of the shares acquired first, and it describes average basis as an option for mutual fund shares. Your broker’s tax forms and a tax professional are the right sources for a return.

What to know before you rely on it

  • Costs are in US dollars per share or unit; non-US holdings are valued in US dollars too.
  • Cash has no cost basis and is left out of P&L.
  • Dividends and fees are not added to cost or P&L.
  • A holding without a cost still feeds concentration, correlation, crash replays and the other checks.

Frequently asked questions

Keep a running average cost per holding and blend each new buy in by share count. Exent does this automatically when you add shares or upload a new screenshot into the same portfolio.

Average cost. Each holding has one average cost per share, and realized P&L on a sale is the sale price minus that average, times the shares sold.

Enter only the purchase date and Exent uses that day’s closing price, or leave it blank. A holding without a cost still counts in every risk check; only its P&L is blank.

No. A split multiplies your shares and divides your average cost by the same ratio, so the total cost basis and P&L stay the same.

No. They are before fees and taxes and are meant for tracking, not for tax reporting.

See what your portfolio is really made of.

Upload a screenshot of your holdings and get concentration, overlap, crash exposure and a risk-matched benchmark in about a minute.

Check my portfolioLimited offer$1.95 for unlimited checks· unlimited checks

Educational content, not investment advice. Examples are illustrative; past performance does not guarantee future results.

DISCLAIMER: Exent AI is an informational research platform and does not provide investment advice, financial advice, or act as an investment adviser, broker-dealer, or fiduciary. All content, analytics, and model outputs are provided for educational and informational purposes only and should not be relied upon as a recommendation to buy, sell, or hold any financial instrument. Investing involves risk, including the possible loss of principal. Exent AI does not execute trades, hold customer funds, or provide brokerage services. Past performance and hypothetical results are not indicative of future results. Third-party data and AI-generated outputs may be incomplete or inaccurate.