# Break-even price

The Break-even price (BEP) is a price level where you can sell your base currency or place a stop loss to exit the market without any losses. Note
The Break-even price appears when there is at least one active sell order in the grid. If there are no open sell orders, the level is not shown.

## Calculating the Break-even price

When calculating the Break-even price, the system takes into account the following values:

1. The total volume of all open sell orders.
Each sell order contains a certain amount of the base currency. The sum of those volumes results in the total number of coins in active sell orders.
2. The average buy price for open sell orders.
To place a sell order, there should be some base currency. It’s necessary to purchase it first using the quote currency. Usually, the base currency is purchased at different times and at various prices, so the average buy price has to be considered.
3. Reinvested funds to place new buy orders.
When a sell order is executed, the bot generates some profit. It gets partially reinvested into a new buy order associated with the previous sell one (as per the Grid strategy).
The system calculates a double size of the default trading fee, as it’s applied when both buying and selling the base currency.

The formula for calculating the BEP would be:

`The sum of the total quote amount and the reinvested profit divided by the overall base currency volume + the 2x trading fee.`

Attention
If you manually cancel sell orders in the grid, the BEP calculations become inaccurate. As the system will count only sell open orders.

## Selling base currency at the BEP level

When the base currency is sold at the Break-even price, you will receive all the invested quote currency back to your available trading balance, taking into account the trading fee and the reinvested funds.

## Changes in the Break-even level

The Break-even price level will be recalculated each time a new buy or sell order is executed. If a new buy order is executed, the amount of the base currency in the open orders increases, and the base currency gets purchased at a better price. As a result, the total purchase price of the base currency gets averaged, and the BEP moves lower, allowing you to exit the trade or start gaining profits earlier than before.

However, once a sell order gets executed, the amount of the base currency used in the bot decreases. Therefore, the system recalculates its average purchase price and adjusts the BEP, respectively. Since the sell orders that contain the base currency, purchased earlier at a lower price, get executed first, only the base bought at a higher price is left, so the average value becomes higher.

Note
When you run the bot, the base currency is purchased at the current favorable price; respectively, the execution of initial sell orders will not affect the price changes of the break-even point. Only the next executed buy orders trigger a recalculation of this price.

## Example of the BEP calculations

For example, let's calculate the Break-even price for a newly created SOL/USDT bot. All the base currency for placing initial sell orders was purchased at the bot’s start: The base currency used for sell orders was purchased at the same price, 15.93 - that would be an average buy price. With the received base currency, the system created 5 initial sell orders: In the "Open orders" tab, you may calculate the total volume of the base currency (30.89 SOL) in open sell orders. Multiplying this number by the avg. buy price determines the total current value in the quote currency (492.077 USDT).

Now let’s calculate the current purchase price. As the bot has only filled initial orders and has generated no profit so far, there’s no reinvested profit (reinvested = 0). So, we can calculate the current buy price by dividing the total current value of the quote currency by the total volume of the base currency:

`492.077 USDT / 30.89 SOL. = 15.93`

In this example, we get the same price as our start price because the bot was just launched, but with each newly executed buy order, this value will change.

Then adding the 2x trading fee (0.2%) results in approximately 15.97, which is the BEP level shown on the chart: The BEP is a good indicator that helps you navigate your break-even point with the funds invested in the bot (specifically the base currency). It can be used to determine at what price you can fix your profit with a Stop Loss without the risk of high volatility or understand at what price you can expect a positive change in the base currency value.