Retry & Backoff Calculator
Turn retry parameters into a timeline with jitter envelopes, totals and copy-ready configs.
Enter a base delay, multiplier, cap, attempt count and jitter mode to see every retry as a timeline bar with a min/max envelope. The tool reports expected and worst-case cumulative waits, checks an optional deadline against the worst case, and emits axios-retry, tenacity, Polly and AWS-style snippets with your exact numbers. Jitter modes are none, full (uniform 0 to delay), equal (delay/2 + uniform half) and AWS decorrelated (min of cap and a random value between base and three times the previous delay). Everything runs locally.
Retry parameters
No jitter — every client retries at exactly the same instant (thundering herd risk).
A cap of 0 disables the cap. Attempts are limited to 1–20 so pasted configs stay bounded.
Schedule
6 attemptsTotals
Expected 31.50 s · worst 31.50 s
| # | Expected | Envelope | Cumulative |
|---|---|---|---|
| 1 | 500 ms | 500–500 ms | 500 ms |
| 2 | 1 s | 1000–1000 ms | 1.50 s |
| 3 | 2 s | 2000–2000 ms | 3.50 s |
| 4 | 4 s | 4000–4000 ms | 7.50 s |
| 5 | 8 s | 8000–8000 ms | 15.50 s |
| 6 | 16 s | 16000–16000 ms | 31.50 s |
Config snippets
axios-retry
axiosRetry(client, {
retries: 5,
retryDelay: (count) => Math.min(30000, 500 * Math.pow(2, count - 1)),
retryCondition: () => true, // none jitter envelope: see the timeline above
});tenacity
@retry(
stop=stop_after_attempt(6),
wait=wait_exponential(multiplier=0.500, exp_base=2, max=30),
)Polly
new AsyncRetryPolicy<HttpResponseMessage>()
.WaitAndRetryAsync(6, attempt =>
TimeSpan.FromMilliseconds(Math.Min(30000, 500 * Math.Pow(2, attempt - 1))))AWS
base = 500 ms; cap = 30000; multiplier = 2 delay = min(cap, base * multiplier ** attempt) // none jitter
Examples
Canonical exponential schedule
base 500 ms, multiplier 2, cap 30 s, 6 attempts0.5 / 1 / 2 / 4 / 8 / 16 s — expected total 31.5 s.The cap does not bind until much later; the last delay dominates the total wait.
Deadline breach
same schedule with a 30 s deadlineDeadline 30 s: exceeded (worst case 31.5 s).Checking worst case rather than expectation avoids a pleasant surprise in production.
Full jitter
base 500 ms, full jitterFirst attempt envelope 0–500 ms, expected 250 ms.Spreading clients across the envelope reduces the thundering-herd effect after an outage.
About this tool
Retry & Backoff Calculator turns a few constants into the schedule they actually produce. Set a base delay, multiplier, cap, attempt count and jitter mode, then see every retry as a timeline bar with an expected value and a min/max envelope.
The schedule follows exponential backoff: attempt n waits for min(cap, base × multiplier^(n−1)). Four jitter modes are modelled deterministically: none, full (uniform 0…delay), equal (delay/2 + uniform half) and AWS decorrelated (min of cap and a random value between base and three times the previous delay). Expected and worst-case totals are computed from the same model, and an optional deadline is checked against the worst case.
Config snippets for axios-retry, Python tenacity, .NET Polly and AWS-style pseudo-code bake in the numbers you entered, so a review can compare the intended schedule with what the code will do. All math runs locally and nothing is uploaded.
What this tool does not do
- Jitter statistics are expectation values and envelope bounds, not a simulation of a particular random seed.
- Snippets are templates: library APIs change, so verify the emitted options against the version you use.
- The tool models wait time only; it does not simulate request timeouts, circuit breakers or server load.
- Decorrelated jitter uses previous expected delay rather than a sampled random delay, so it is a deterministic approximation.
How to use this tool
Enter the retry constants
Set base delay in milliseconds, a multiplier greater than 1, an optional cap (0 disables it) and 1–20 attempts.
Choose a jitter mode
None is deterministic, full and equal spread retries across an envelope, and decorrelated uses the previous delay as its upper bound.
Add a deadline
Enter a deadline in milliseconds to see whether the worst-case cumulative wait stays inside it.
Read the timeline
Bars show expected delay per attempt; the table lists expected value, envelope and cumulative wait.
Copy a config
Open a snippet section and copy the axios-retry, tenacity, Polly or AWS-style config with your numbers.
Use cases
Tune a flaky API client
See how a multiplier change affects total wait before shipping the config.
Review a pull request
Compare the retry constants in code with the schedule and deadline they imply.
SRE resilience planning
Choose jitter and caps that keep worst-case waits inside an SLA budget.
Jitter modes and envelopes
| Mode | Envelope per attempt |
|---|---|
| none | Exactly the exponential delay — simple, but clients can synchronise. |
| full | Uniform 0…delay; expected delay / 2. |
| equal | delay/2 + uniform 0…delay/2; expected delay / 2. |
| decorrelated | Uniform base…3 × previous delay, capped; expectation from the bounds. |
Envelope maxima are used for the worst-case total; expectations use the mean of each distribution.
Common mistakes
Mistake:Leaving jitter off for many clients.
Fix:Use full or equal jitter so retries from different clients do not align.
Mistake:Using a multiplier of 10 without looking at the timeline.
Fix:Even three retries can mean minutes of waiting; check expected and worst-case totals.
Mistake:Comparing a deadline with the expected total.
Fix:The tool checks the deadline against the worst case, which is the safer bound.
Mistake:Counting attempts as retries in config snippets.
Fix:Snippets emit attempts − 1 retries where the library expects a retry count.
Frequently asked questions
What is exponential backoff?
Each retry waits longer than the previous one: delay = base × multiplier^(attempt − 1), usually capped. A 500 ms base with a multiplier of 2 gives 0.5, 1, 2, 4, 8 and 16 seconds for six attempts. The timeline makes the cumulative wait easy to see before you ship the config.
What is jitter and why does it matter?
Jitter randomises each delay so many clients that failed at the same time do not retry in lockstep. Full jitter picks uniformly from 0 to the delay, equal jitter keeps half the delay and randomises the rest, and AWS decorrelated jitter bounds the delay between the base and three times the previous delay.
What is the difference between full and equal jitter?
Full jitter can produce very short delays (even near zero) and has an expected value of delay / 2. Equal jitter never goes below delay / 2, trading a wider minimum for a smoother, more predictable retry pattern. Both have the same expected value and the same upper bound.
Why is the deadline checked against the worst case?
Because a deadline is a promise about the slowest path, not the average one. The calculator sums envelope maxima for the worst-case total; if that exceeds the deadline, the verdict flags a breach even when the expected total fits.
How many retries are reasonable?
It depends on the caller's latency budget. Five or six attempts with a cap are common for interactive clients; long batch jobs may allow more. Use the timeline to check the worst-case total and combine retries with timeouts and a circuit breaker rather than retrying forever.
Can I copy the result into my code?
Yes. The tool emits axios-retry, Python tenacity, .NET Polly and AWS-style snippets with the numbers you entered. They are templates: confirm the option names against the library version you use before deploying.
Does the calculator send my configuration anywhere?
No. All schedule generation, formatting and snippet emission happen in your browser tab, with no network requests or persistence.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.