Skip to content

Exponential Backoff Calculator

Work out retry delays for exponential backoff: each wait, the cap, full or equal jitter, and the total time a client spends retrying a failing request.

Calculator Details

Longest total wait:1m 3sSee results ↓

The wait before the first retry, e.g. 0.1 to 1 second

Each wait is this many times the last: 2 doubles it; gRPC uses 1.6

The cap: no single wait is longer than this

How many times to retry after the first attempt fails

Randomness that spreads clients out: full jitter waits a random time from 0 to the delay; equal jitter from half the delay to the delay

Your Results

Longest total wait: 1m 3s

Longest total wait

1m 3s

About 31.5s on average with full jitter

First wait

1s

Last wait

32s

Cap not reached

Shortest total wait

0s

If every random draw is the lowest

6 retries starting at 1 s and multiplying by 2 wait at most 63 s in total (about 31.5 s on average with full jitter); the last wait is 32 s.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Wait before each retry

Wait before each retry

Detailed Breakdown

Retry by retry
RetryWaitAverageTotal so far (longest)
10s – 1s500 ms1s
20s – 2s1s3s
30s – 4s2s7s
40s – 8s4s15s
50s – 16s8s31s
60s – 32s16s1m 3s

How This Calculator Works

How it's calculated

delay before retry n = min(maximum, first delay × multiplier^(n − 1))

wait = random(0, delay)

Your numbers: retry 1 waits up to 1 s, retry 2 up to 1 × 2 = 2 s, and so on, never more than 60 s. Over 6 retries the delays add up to 63 s. With full jitter each wait is random, averaging half of its delay: 31.5 s in total.

Frequently Asked Questions

What is exponential backoff?

A retry strategy where each wait is a fixed multiple of the last one, usually double: 1 second, then 2, 4, 8 and so on, up to a maximum. Waiting longer after each failure gives an overloaded or recovering service time to catch up instead of hammering it.

What is the formula for exponential backoff?

delay = min(maximum, first delay × multiplier^(n − 1)) for retry n. With a first delay of 1 second, a multiplier of 2 and a 60-second cap, the waits are 1, 2, 4, 8, 16, 32, then 60 seconds from the seventh retry on. Some libraries count from attempt 0 and write first delay × 2^attempt; the sequence is the same.

Why add jitter to backoff?

Without it, clients that failed at the same moment retry at the same moments too, so the service sees synchronized waves of traffic. Jitter randomizes each wait so retries spread out. In AWS’s simulations of clients competing for one resource, full jitter (a random wait from 0 to the delay) needed far fewer calls in total than backoff without jitter.

Full jitter or equal jitter?

Full jitter waits a random time from 0 to the delay: the best spread, but sometimes a retry comes almost immediately. Equal jitter waits half the delay plus a random half, so there is always some backoff. Full jitter averages half the delay, equal jitter three quarters.

How many times should I retry?

Enough to ride out a short blip, not so many that a broken request ties up resources for minutes. Three to five retries are common for user-facing calls; background jobs can retry longer with a higher cap. Set a total time budget too, and only retry errors that can succeed later (timeouts, 429, 503), not 400-type mistakes.

What maximum delay should I use?

Something your caller can tolerate for a single wait: often 30 to 60 seconds for services, a few seconds for interactive requests. Without a cap, doubling grows fast: the 20th retry of a 1-second backoff would wait over 6 days.

Should I use Retry-After instead?

Yes, when the server sends it. A 429 or 503 response with a Retry-After header tells you exactly how long to wait; use it in place of the computed delay (and still add a little jitter if many clients will see the same value).

Included: capped exponential backoff (first delay × multiplier^(n − 1), never above the maximum), no jitter, full jitter and equal jitter with their range and average, the total wait, and an optional time per failed attempt. Left out: decorrelated jitter and gRPC's ±20% jitter (their totals depend on the random draws), Retry-After values from the server, retry budgets and circuit breakers, and the chance that a retry succeeds, which decides how many retries actually happen.

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.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy