> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clue.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# PnL and ROI explained

> How Clue calculates profit and loss and return on investment for positions, closed trades and trader performance.

PnL tells you how much you made or lost in dollars; ROI tells you how much relative to what you put
in. Here's how Clue works out both, and how to read the figures on your screen.

## Unrealized and realized PnL

**[PnL](https://docs.clue.trade/help/glossary.md#pnl)** (profit and loss) comes in two kinds:

* **Unrealized PnL** — the gain or loss on a position that's still open. It moves with the price and
  isn't locked in yet. You'll see it under **Your Position** on a market's page and on your
  **Profile**.
* **Realized PnL** — the gain or loss locked in when you close all or part of a position. It's added
  to (or taken from) your balance, and listed in [History](https://docs.clue.trade/trading/history.md) and **Profile › Closed**.

**Example:** You open a \$100 ETH long. ETH rises 10%: your unrealized PnL is **+\$10**. You close half
the position: **+\$5** is realized, and the other +\$5 stays unrealized on the half you still hold.

Every figure comes from Hyperliquid. Clue never estimates a PnL for a trade.

## ROI on a position

**[ROI](https://docs.clue.trade/help/glossary.md#roi)** (return on investment) is your PnL as a percentage of what you put in.
For a perp, that's the **margin you opened the position with**:

> ROI = PnL ÷ margin at entry
>
> Margin at entry = position size × entry price ÷ leverage

**Example:** You open a \$100 BTC long with \$20 of margin at 5x. BTC rises 10% and you're up \$10. Your
ROI is \$10 ÷ \$20 = **+50%**.

Measuring against the position size instead would show +10% — a fifth of what your money actually
earned. That's why ROI on a leveraged trade can be much bigger, or much more negative, than the price
move.

Image goes here
Position with PnL and ROI
Your Position on a BTC long: Size, Unrealized PnL '+$10.00 (+50.0%)' in green, and the Margin (Used) | Avg. Entry | Liq. Price row below with Margin (Used) showing $30.00.
Phone screenshot

### Why ROI and Margin (Used) don't seem to match

Under **Your Position**, the **Margin (Used)** figure can look like it disagrees with ROI. It doesn't
— they measure different things:

* **ROI** is always measured against your margin **at entry**.
* **Margin (Used)** is the margin in the position **right now**, as Hyperliquid reports it. For an
  isolated position, that includes your unrealized PnL — and any margin you've added or removed since.

**Example:** You open with \$20 of margin at 5x. The price rises 10%: you're up \$10.

| | Figure | Why |
| - | - | - |
| Unrealized PnL | +\$10.00 | The price move on a \$100 position |
| ROI | +50.0% | \$10 ÷ the \$20 you opened with |
| Margin (Used) | \$30.00 | Your \$20, plus the \$10 you're up |

Dividing \$10 by \$30 would give 33%, but that's not your return — you only ever put in \$20. If you
later add \$10 with **Adjust Margin**, **Margin (Used)** grows to \$40, while ROI is still measured
against the \$20 you opened with.

### ROI on closed trades

A closed perp trade's ROI is its realized PnL ÷ the margin it was opened with, using the leverage Clue
recorded when you placed the order. For a trade placed outside Clue (or before Clue kept records)
there's no recorded leverage, so no ROI is shown rather than a guess.

On spot, ROI is the PnL ÷ what you paid for the tokens.

## ROI on Performance

A trader's **Performance** page — yours or anyone's — shows PnL and ROI over **7D**, **30D** or
**All-Time**. This ROI works differently, because a whole account has deposits and withdrawals, not a
single entry.

Clue divides the PnL over the period by the account's **time-averaged value** over that period. That
means:

* **A deposit is never counted as a return.** Adding \$1,000 doesn't make your ROI jump.
* **The sign always matches the PnL.** If you made money over the period, ROI is positive; if you
  lost, it's negative.

**Example:** Over 30 days an account averages \$2,000 in value and makes \$100. Its 30D ROI is \$100 ÷
\$2,000 = **+5%**, whether or not money was deposited along the way.

On the chart, switch between PnL and ROI. In ROI mode, the line is the PnL curve divided by that same
average value. [Profiles and Performance](https://docs.clue.trade/social/profiles-and-performance.md).

Image goes here
Performance chart in ROI mode
The Performance page with the chart in ROI mode, the 7D / 30D / All-Time selector, and the period's ROI figure above the chart.
Phone screenshot

## Small numbers and zero

Clue never shows a figure that isn't zero as if it were zero:

| You see | It means |
| - | - |
| **+\<\$0.01** / **−\<\$0.01** | A real gain or loss smaller than a cent, in green or red. |
| **\$0.00** | Exactly zero, in grey. |
| **+\<0.1%** / **−\<0.1%** | A real return smaller than 0.05%, in green or red. |
| **0.0%** | Exactly zero, in grey. |

## Colors

By default gains are green and losses are red. In some places it's the other way round, so you can
switch: go to **Settings › Theme** and choose **Green up · Red down** or **Red up · Green down**.

## What PnL includes

| | In PnL? | Where to find it |
| - | - | - |
| The price move | Yes | PnL |
| Trading fees | No | **Fee** on each trade in History's **Trade Details**, and the ticket's **Fees** |
| Funding | No | **Funding** under **Your Position**, and in **Trade Details** |

Hyperliquid settles funding separately from your trading PnL, so neither unrealized nor realized PnL
includes it. For your full result on a trade, add funding and take off fees. [Funding](https://docs.clue.trade/trading/funding.md)
· [Fees](https://docs.clue.trade/fees.md).

## Related

> [card] [History](https://docs.clue.trade/trading/history.md)
>
> Every trade, with fees and funding.

> [card] [Profiles and Performance](https://docs.clue.trade/social/profiles-and-performance.md)
>
> Account equity, ROI and risk figures.

> [card] [Funding](https://docs.clue.trade/trading/funding.md)
>
> The hourly payment between longs and shorts.

> [card] [Leverage and isolated margin](https://docs.clue.trade/trading/leverage-and-margin.md)
>
> Why leverage changes ROI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.