3min

# PnL Math

### How do I calculate my unrealized PnL?

Rage is one of the only onchain perps to allow users withdraw their unrealized PnL (via Free Collateral). To calculate the unrealized PnL of a trade position:

Unrealized PnL = Token Position * (Current Price - Entry Price)

### How do I calculate my realized PnL?

The hisotrical realized PnL can be calculated by exporting a CSV of your historical trades and summing the average open and close value of your trades chronologically.

### What is my account value?

Account value is the combination of your margin deposits, margin withdrawals, and realized/unrealized PnL. It is displayed on the main trading interface and can be used to derive your unrealized/realized PnL.

Account Value = Deposits - Withdrawals + Realized PnL + Unrealized PnL