{"uid":"cap_MwcQhdzKDCROCz1OAscUN","slug":"investing-math-drawdown-recovery-calculator-14bd602e","name":"Investing Math: Drawdown & Recovery Calculator","description":"Gain needed to recover a percentage loss, or the maximum drawdown and recovery gain from a list of period returns.","url":"https://invest-math.x402tookit.com/drawdown-recovery?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"lossPct":{"type":"number","description":"A loss in percent, 0 to 99.9, for the gain needed to get back to even"},"returnsPct":{"type":"string","description":"Period returns in percent, comma separated, e.g. 5,-10,3 (instead of lossPct)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"lossPct":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"yearsAt7Pct":{"type":["null","number"]},"yearsAt10Pct":{"type":["null","number"]},"requiredGainPct":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RMLy2yTOjrURJoP6UiOZz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the gain needed to recover from a percentage loss, or computes maximum drawdown and required recovery gain from a series of period returns.","exampleAgentPrompt":"I lost 35% on my portfolio this year — how much of a gain do I need to get back to even, and how many years would that take at a 7% annual return?","exampleUseCases":[{"title":"Single loss recovery calculation","prompt":"My investment dropped 40% — what percentage gain do I need to fully recover and get back to where I started?"},{"title":"Drawdown analysis from monthly returns","prompt":"Here are my monthly returns for the past year: 3, -8, 5, -15, 2, 7, -4, 1, 6, -2, 4, 3 — can you find the maximum drawdown and tell me how much gain is needed to recover from it?"},{"title":"Bear market recovery planning","prompt":"The S&P 500 dropped 50% in 2008-2009 — how big a rally was needed to recover that loss, and how many years would it take at 10% annual growth?"}],"resultDescription":"Returns the required gain percentage to recover from a loss, maximum drawdown from a period-returns series, the corresponding recovery gain needed, estimated years to recover at 7% and 10% annual returns, the input loss percentage, a plain-language summary, and optional disclaimer text.","failureModes":["Missing both lossPct and returnsPct parameters returns an error","lossPct out of range (0-99.9) results in validation failure","Malformed returnsPct string (non-numeric, wrong delimiter) causes parse error","Empty returnsPct list returns no drawdown result","Network timeout or service unavailability returns HTTP 402/503"],"whenToPreferThis":"Use this endpoint when you need to quantify the asymmetric math of investment losses — specifically how much more you must gain to recover from a drawdown. It handles both a simple single-loss scenario (via lossPct) and full time-series drawdown analysis (via returnsPct). Prefer this over general statistics endpoints when the core question is loss recovery or drawdown impact.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:11.100Z","isFirstParty":false,"canonicalSlug":"investing-math-drawdown-recovery-calculator-14bd602e"}