Guide

Cost basis and realized P/L on DeGiro

DeGiro tells you what you bought and sold, but it does not hand you a cost-basis figure. To know your actual profit or loss on a position, you need to compute it yourself.

Why DeGiro does not just show it

DeGiro's CSV gives you one row per event: every Koop, every Verkoop, every fee. It does not carry a running average cost column. To know what a position actually cost you on average, you have to fold every buy and sell in order — that is what FolioInsights does for you, but it helps to understand the rules it uses.

The weighted-average method

Cost basis is the average price you paid per share, weighted by how many shares you bought at each price. It works like this:

  • A buy shifts the average toward the new buy price, proportional to quantity.
  • A sell leaves the per-share average unchanged — only the total quantity goes down.
  • A fee attached to a sell (same order ID) is subtracted from realized P/L, not added to basis.

Worked example

Three events on the same ISIN:

  1. Buy 10 at €100 → total cost €1,000, avg cost €100.00.
  2. Buy 5 at €120 → total cost €1,600, total qty 15, avg cost €106.67 (that is 1,600 ÷ 15).
  3. Sell 3 at €130 with a €2 fee → realized gain = 3 × (130 − 106.67) − 2 = €67.99. Remaining position: 12 shares, still at €106.67 avg cost.

That last point trips people up: the avg cost does not change when you sell. You are realizing part of the gain on the shares you are selling, and the basis for the remaining shares stays the same.

What FolioInsights does with your CSV

  • Sorts every transaction chronologically.
  • Folds buys and sells per ISIN, keeping the weighted-average cost.
  • Attaches fees to their matching order by Order ID so realized P/L nets them out.
  • Handles corporate actions: WIJZIGING ISIN and FUSIE rows zero out the old ISIN and open the new one at the same cost, the way a broker would.
  • Keeps everything per currency. EUR positions stay in EUR, USD in USD.

What you can rely on, and what you cannot

Cost basis and realized P/L are exact from your CSV — they do not depend on any external price source. Unrealized P/L depends on a current price: by default the last buy price, or whatever you enter on the Prices tab. That is why unrealized numbers move when you refresh manual prices and realized numbers do not.

Ready to try it?

Drop your DeGiro account.csv into the browser. One-time €19, lifetime access, your data never leaves your device.

See FolioInsights