Home › Investing & Real Estate › Maximum Drawdown Calculator
Maximum Drawdown Calculator
Scans a series of portfolio or equity values in time order for the largest percentage fall from a running peak, reporting the peak and trough values and positions, whether the peak was regained, and the drawdown at the end of the series.
When to use
You want the worst historical loss of a strategy, fund or portfolio from a list of values, or the current distance below its high-water mark.
Do not use when: You need volatility-based risk (use sharpe-ratio or descriptive-statistics) or your data are period returns rather than values (convert them to a cumulative value series first). Informational only; not financial advice.
Formula
drawdown_t = (max_{s≤t} values[s] − values[t]) / max_{s≤t} values[s]; max_drawdown_percent = 100 × max_t drawdown_t; current_drawdown_percent = 100 × drawdown_n
Drawdown is measured from the running maximum (high-water mark); the first drawdown that reaches the maximum depth is reported. Values must be positive for the percentage to be defined. Informational mathematics only; not financial advice.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
values | number_list | yes | Portfolio values, prices or equity-curve points from oldest to newest (2–500 values, all greater than 0). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
max_drawdown_percent | number | % | Largest loss from a peak to a later trough, as a positive percentage of the peak. |
max_drawdown_amount | number | peak_value − trough_value. | |
peak_value | number | Value at the start of the maximum drawdown. | |
trough_value | number | Lowest value after that peak. | |
peak_index | integer | 0-based position of the peak in the list. | |
trough_index | integer | 0-based position of the trough. | |
drawdown_length_periods | integer | trough_index − peak_index. | |
recovered | boolean | True when a later value reached or exceeded the peak value. | |
recovery_index | integer | 0-based position of the first value at or above the peak after the trough (only when recovered). | |
current_drawdown_percent | number | % | Fall of the last value from the running peak of the whole series, as a positive percentage (0 at a new high). |
Example
100, 120, 90, 110, 80, 130: {"values":[100,120,90,110,80,130]} → {"max_drawdown_percent":33.33,"max_drawdown_amount":40,"peak_value":120,"trough_value":80,"peak_index":1,"trough_index":4,"drawdown_length_periods":3,"recovered":true,"recovery_index":5,"current_drawdown_percent":0}
1000, 1100, 1050, 900, 950, 1000, 1080 (not recovered): {"values":[1000,1100,1050,900,950,1000,1080]} → {"max_drawdown_percent":18.18,"peak_value":1100,"trough_value":900,"peak_index":1,"trough_index":3,"recovered":false,"current_drawdown_percent":1.82}
GET https://tttkmbb.com/api/v1/calculate/max-drawdown?values=100%2C120%2C90%2C110%2C80%2C130
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/max-drawdown(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/max-drawdown · Markdown: https://tttkmbb.com/investing/max-drawdown.md · JSON definition: https://tttkmbb.com/investing/max-drawdown.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="max-drawdown" - OpenAPI operationId:
calculate_max_drawdown - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Drawdown (economics) (reference)
FAQ
Why is the drawdown reported as a positive number?
It is the size of the loss from the peak; a 33.33 % drawdown means the value fell to 66.67 % of its peak. A gain of 50 % is then needed to recover.
Can I enter returns instead of values?
Convert them first: start at 100 and multiply by (1 + return) each period to get a value series, then enter those values.
Related calculators
- Sharpe Ratio Calculator — Volatility-based risk-adjusted return.
- Descriptive Statistics Calculator — Mean and standard deviation of the same series.
- Percentage Change Calculator — Gain needed to recover from a given loss.