TL;DR
PnL (Profit and Loss) is the measure of how much money you’ve made or lost on your trades, calculated as the difference between what you paid and what you received (or current value).
Realized PnL is locked in — it’s from trades you’ve completed (bought AND sold). If you bought 1 SOL at $100 and sold at $150, your realized PnL is +$50. Unrealized PnL is the paper gain/loss on positions you still hold. If you bought at $100 and SOL is now $80, your unrealized PnL is -$20 — but you haven’t actually lost until you sell.
For simple trades: PnL = (sell amount in SOL/USDC) - (buy amount in SOL/USDC) - fees. For memecoin trading, don’t forget to include swap fees, priority fees, and Jito tips. A common mistake is calculating PnL in SOL terms when SOL’s USD price has also changed. A trade that made 2 SOL profit might be a USD loss if SOL dropped 30% during that period.
Wallet X-Ray on MadeOnSol calculates PnL across all your token trades by analyzing on-chain history. Portfolio trackers aggregate your positions across multiple wallets. For serious traders, tracking PnL per trade, per strategy, and over time is essential. Common metrics include win rate (% of trades profitable), average win vs average loss, and total ROI.