Token Bucket Size Calculator
Work out token bucket size instantly with clear inputs, formula shown and shareable results.
About Token Bucket Size Calculator
A token bucket refills at the committed rate and its depth determines how long traffic may exceed that rate. Two constraints apply: the bucket must hold the burst you want to permit, and it must hold at least one round trip of data — 1.5 round trips is a safer rule — so TCP's window growth is not mistaken for a violation.
Formula
Bucket sizing
burst bytes = rate x burst duration / 8; RTT bytes = rate x RTT / 8; recommended = max(2 x MTU, burst bytes, 1.5 x RTT bytes)
Worked example
With the default values below, Token Bucket Size Calculator returns Recommended bucket size of 732.42 KiB. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Token fill rateminimum 0.001 Mbps
- 100 Mbps
- Burst duration to allowminimum 0.1 ms
- 50 ms
- MTUaccepts 64–9,216 bytes
- 1,500 bytes
- Typical round-trip timeminimum 0.1 ms
- 40 ms
Results
- Recommended bucket size
- 732.42 KiB
- Size from the burst window
- 610.35 KiB
- Size from one round trip of data
- 488.28 KiB
- Burst the recommended bucket allows
- 60.00 ms
Step by step
- 1Values used
- 2Bucket sizing
- 3Recommended bucket size= 750,000
- 4Size from the burst window= 625,000
- 5Size from one round trip of data= 500,000
- 6Burst the recommended bucket allows= 60.00 ms
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What happens if the bucket is too small?
Normal TCP bursts are dropped, throughput collapses well below the committed rate, and the symptom looks like a slow link rather than a misconfigured policer.
Can the bucket be too large?
Yes. A very deep bucket lets long bursts through at line rate, which defeats the purpose of rate limiting and can overwhelm downstream buffers.
Related Calculators
- Audio Bitrate And Size Calculator
- Buffer Size Requirement Calculator
- Session Table Size Calculator
- 5G Throughput Estimate Calculator
- Administrative Distance Comparison Calculator
- Antenna Gain And Range Calculator
- Attenuation Over Distance Calculator
- Backup Window Bandwidth Calculator
- Bandwidth For Users Calculator
- Bit Error Rate Calculator
You might also need
- Buffer Size Requirement CalculatorAlso in Network Performance & Design
- Session Table Size CalculatorAlso in Network Performance & Design
- Network Utilisation CalculatorAlso in Network Performance & Design
- Audio Bitrate And Size CalculatorAlso in Network Performance & Design
- 5G Throughput Estimate CalculatorAlso in Network Performance & Design
- Erlang C Agents CalculatorAlso in Network Performance & Design
