Exponential Backoff Calculator: Retry Delays, Caps and Jitter
By FindMySum · Last reviewed
An exponential backoff calculator shows what a retry setting means in seconds. Enter the first delay, the multiplier, the maximum delay and the number of retries, and it lists the wait before each retry, marks where the cap takes over, and adds up the total time a client could spend retrying, with and without random jitter.
The formula
Exponential backoff multiplies the wait after each failure:
delay before retry n = min(maximum, first delay × multiplier^(n − 1))
The calculator opens with a common setting: a first delay of 1 second, a multiplier of 2, a maximum of 60 seconds and 6 retries. The delays are 1, 2, 4, 8, 16 and 32 seconds, 63 seconds in all. Allow 10 retries instead and the seventh would be 64 seconds, so the cap holds it at 60: the waits finish 60, 60, 60, 60 and the total grows to 303 seconds.
The cap matters because doubling grows fast. Without one, the 20th retry of a 1-second backoff would wait more than six days.
Why exponential?
A service that fails is often overloaded. If every client retries at a fixed interval, the load never drops; if clients retry immediately, it gets worse. Waiting longer after each failure reduces the retry traffic quickly, giving the service room to recover, while a transient blip (a dropped connection, a brief failover) is still covered by the first short retries.
Jitter
Pure exponential backoff has a flaw: clients that failed together retry together. If a thousand clients hit an error at the same moment, all thousand retry after 1 second, again after 2 seconds, and so on, in synchronized waves. Jitter adds randomness so the retries spread out. The calculator offers the two common forms:
- Full jitter: wait a random time from 0 to the delay. On average that is half the delay, so the default setting's 63 seconds of delays average 31.5 seconds of waiting.
- Equal jitter: wait half the delay plus a random time up to the other half. The average is three quarters of the delay, and there is always at least half the delay of backoff.
Choosing jitter changes the range of each wait, which the breakdown table shows retry by retry. The longest possible total is the same as without jitter; the average and the shortest are lower. Marc Brooker's 2015 analysis on the AWS Architecture Blog compared these strategies under contention and found that adding jitter sharply reduced both the total number of calls and the time to finish.
Total time spent retrying
The waits are only part of the story. Each failing attempt also takes time before it fails, often a full timeout. Open the advanced option and enter the time per attempt: with a 5-second timeout, the default setting runs 7 attempts (the first try plus 6 retries) and can take 7 × 5 + 63 = 98 seconds before giving up. That number should fit inside whatever is waiting on the result, whether a user, a queue message's visibility timeout or a job scheduler's deadline.
Choosing the settings
Some rules of thumb:
- First delay: long enough for a transient fault to clear, short enough not to annoy. 100 milliseconds to 1 second is typical for service-to-service calls.
- Multiplier: 2 is the usual choice; gRPC uses 1.6 for a gentler climb.
- Maximum: the longest single wait the caller will tolerate, often 30 to 120 seconds.
- Retries: three to five for interactive requests; more for background work with a total time budget.
Retry only failures that can succeed later: timeouts, connection resets, 429 Too Many Requests, 502, 503 and 504. When the server sends a Retry-After header, wait that long instead of the computed delay. And retry at one layer of a system, not at every layer, or a single failure can multiply into a storm of requests.
More questions
What is decorrelated jitter?
A third variant from the same AWS analysis: each wait is random between the base delay and three times the previous wait, capped at the maximum. Because each wait depends on the last random draw, its totals vary from run to run, so this calculator doesn't model it; full jitter performs similarly in practice.
Is exponential backoff the same as a retry policy in my cloud SDK?
Most SDKs implement it for you. The AWS SDKs, Google Cloud client libraries and Azure SDKs retry throttling and transient errors with capped exponential backoff and jitter by default; their settings (first delay, multiplier, maximum, attempts) are the inputs on this page, so you can see what a configuration means in seconds.
What is a circuit breaker and how does it relate to backoff?
A circuit breaker stops calling a service altogether after repeated failures, fails fast for a while, then lets a few trial requests through. Backoff spaces out the retries of one request; a circuit breaker protects the service from all requests. Large systems use both.
Should retries happen at every layer of a system?
No. If a front end, a service and a database driver each retry three times, one user request can become 27 database calls during an outage. Retry at one layer, usually the one closest to the user or the one that knows whether the operation is safe to repeat, and fail fast elsewhere.
Are retries safe for every request?
Only for idempotent operations, ones that can run twice with the same effect as once, such as reads or a PUT that sets a value. Creating an order or charging a card could happen twice if the first attempt succeeded but its response was lost. Use idempotency keys so the server can recognize a repeated request.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.