Max drawdown calculator: peak, trough and recovery
Paste an equity or price series, oldest first, to see the largest fall from a peak in percent and in amount, where the peak and the trough were and when the series got back to that peak. Free, no sign-up required.
Formula for max drawdown
Maximum drawdown is the largest fall from a running peak to a later value, measured as a share of that peak. For each value in the series the calculator keeps the highest value so far and computes:
Drawdown = (running peak − value) ÷ running peak
Maximum drawdown = the largest drawdown in the series
It also shows the fall in amount, the positions of the peak and the trough, the first later value back at or above that peak, which is the recovery, and how far the last value is below the highest one. A study of the measure by Magdon-Ismail and Atiya describes it as the maximum cumulative loss from a peak to a following bottom.
Worked example
Hypothetical example: eighteen equity values: 10,000, 10,250, 10,180, 10,400, 10,320, 10,650, 10,500, 10,120, 9,880, 9,750, 9,960, 10,240, 10,580, 10,720, 10,690, 10,900, 11,050 and 10,880. This is the calculator's default series, not a real account.
The peak before the largest fall is 10,650 at value 6 and the trough is 9,750 at value 10, four values later. The fall is 10,650 − 9,750 = 900, and 900 ÷ 10,650 = 8.45%, the maximum drawdown.
The series is back at 10,650 or above at value 14 (10,720), four values after the trough. The last value, 10,880, is 1.54% below the highest one, 11,050 at value 17.
Percent or amount: two different largest falls
The largest fall in percent and the largest fall in amount can be different stretches of the same series, so the calculator shows both.
In a hypothetical series of 10, 5, 1,000, 800 and 900, the maximum drawdown is 50%, from 10 to 5, while the largest fall in amount is 200, from 1,000 to 800, which is 20%. MetaTrader 5's testing report keeps the two apart in the same way: its maximal drawdown is stated in the deposit currency and its relative drawdown in percent.
Why your platform shows a different drawdown
The figure depends on what was measured, how often and over how long.
- Sampling: a series of closes misses lows inside each bar. TradingView's strategy report has close-to-close and intrabar versions of the maximum drawdown; the intrabar one uses each bar's low on a long position and its high on a short, so it can be deeper.
- Balance or equity: a balance series changes only when trades close, while equity includes open positions. MetaTrader 5 reports balance and equity drawdowns separately.
- Length of the record: Magdon-Ismail and Atiya show that the expected maximum drawdown grows with the length of the period, so drawdowns over records of different lengths are not like for like.
- Deposits and withdrawals: money added or taken out changes equity without any trading, so remove those flows first.
Pasting the series, and the same calculation in Python
Put one value per line, oldest first, or separate values with tabs or semicolons; commas may only separate thousands, as in 10,250.75. A header line such as Equity is reported as a bad line, not skipped. Values cannot be negative, so for a profit-and-loss column add the starting balance to each running total first. Up to 10,000 values are read in your browser, and nothing is sent anywhere.
The example in Python with NumPy, tested on 6 November 2026:
import numpy as np
equity = np.array([10000, 10250, 10180, 10400, 10320, 10650, 10500, 10120, 9880,
9750, 9960, 10240, 10580, 10720, 10690, 10900, 11050, 10880], dtype=float)
peak = np.maximum.accumulate(equity) # running peak
drawdown = (peak - equity) / peak
trough = drawdown.argmax()
print(f"{drawdown.max():.2%} at value {trough + 1}") # 8.45% at value 10
Which values to enter
- Equity values: account equity or balance at regular points, or a price series, oldest first.
- The same interval throughout: daily, weekly or per trade, so that positions in the result mean the same thing everywhere.
- No cash flows: remove deposits and withdrawals, or use a series of returns turned into an index that starts at 100.
Drawdown limits in software that stops a bot are covered in trading bot risk management. This page sets no limit and gives no view on what a drawdown means for the future.
Frequently asked questions
How do you calculate maximum drawdown?
Track the highest value so far, compute (peak − value) ÷ peak at each point and take the largest result. In the default series that is (10,650 − 9,750) ÷ 10,650 = 8.45%.
Is max drawdown a percentage or an amount?
Usually a percentage of the peak, but reports also give the amount. The largest fall in percent and the largest in amount can come from different stretches, so the calculator shows both.
What is the recovery of a drawdown?
The first later value at or above the peak before the fall. If the series never gets back there, the calculator says it has not recovered by the last value.
Why does my platform show a deeper drawdown?
It may measure lows within each bar, use equity with open positions, or cover a longer period. A series of closes cannot show a fall that happened between two closes.
Can I paste profit and loss instead of equity?
Add the starting balance to the running profit and loss first. A drawdown is a share of a peak, so it needs the account's value, not its change.
Sources
- M. Magdon-Ismail and A. F. Atiya: An analysis of the maximum drawdown risk measure (Rensselaer Polytechnic Institute) (opens in a new tab)
- MetaTrader 5 Help: Testing report (balance and equity drawdown, maximal and relative) (opens in a new tab)
- TradingView Help Center: Strategy report, Overview tab (max drawdown) (opens in a new tab)
- TradingView Help Center: Max drawdown (intrabar) (opens in a new tab)
This calculator is general information, not tax, legal or investment advice. Results depend on the values you enter; fees, margin rules and tax rules differ by exchange and country and change over time, so check the official source and ask a licensed adviser about your own situation. Sources, checks and corrections: see the editorial policy.
Related guides
Send a short project brief
The form or an email is enough. You do not need to share your rules yet.
- The exchange or platform you use
- What the software should do
- Your target timeline
- Project briefs and business inquiriesinfo@fincodelabs.com
- WhatsApp (messages only)+90 545 697 41 15 (opens in a new tab)