# Return on Equity (RoE) and How It's Calculated

### Trade Layout <a href="#trade-layout" id="trade-layout"></a>

The PnL/RoE indicator visualization in the interface switch can be performed by changing the toggle on the '[Settings](https://margex.com/app/settings)' page of your Margex account.

* In order to switch between layouts, first, proceed to the '[Settings](https://margex.com/app/settings)' page of your Margex account:

<figure><img src="/files/1HpiWgYNOs2CThpai5bR" alt=""><figcaption></figcaption></figure>

* From there, press on the 'Trade Layout' switch:

<figure><img src="/files/DzsU3uW9UdknvRTfwtsg" alt=""><figcaption></figcaption></figure>

From now on, the RoE indicator would be reflected in your 'Trading Module' as the evaluation of your positions' performance.

### What is RoE and how it's calculated? <a href="#what-is-roe-and-how-its-calculated" id="what-is-roe-and-how-its-calculated"></a>

**Return on Equity** (ROE%), is an indicator which reflects the current **NET** performance of an open trade.

* <mark style="color:green;">Positive</mark> ROE means that the trade is currently profitable
* <mark style="color:red;">Negative</mark> ROE means that the trade is currently at a net loss currently

<figure><img src="/files/8kp7Gg5CyUIO94iIFu2s" alt=""><figcaption></figcaption></figure>

ROE is calculated based on the trader’s **margin reserved for a trade**, using the following formula:

* **ROE%** = (Unrealized PnL + Realized PnL - CloseOrderCommission) / Margin

For example, if a trader has used $100 as Margin for a position, a ROE value of +20% will mean that the trade is essentially at a net profit of $20.

{% hint style="success" %}
ROE always takes into account not only the flat PnL from the price movement of the asset being traded - but also any associated [trade fees and funding](https://margex.com/margex-fees).&#x20;

When initially opening a position, the ROE% indicator will show a negative value. This is due to the ROE% indicator taking into account the opening and closing trade fees which are incurred for the position.

This provides traders with a fully transparent and precise ROE indicator.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.margex.com/help-center/fa/leverage-trading-guide/how-leverage-works/roe-calculation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
