Traffic Shaping Calculator
Compute token-bucket shaper parameters — committed burst, excess burst and interval — from CIR and Tc.
About Traffic Shaping Calculator
A shaper is a bucket refilled with Bc bits every Tc milliseconds; traffic is metered out at line rate until the bucket empties, then waits for the next interval. Small Tc values give smoother output and lower jitter, at the cost of more scheduler work. Tc chosen too large produces bursts long enough to overflow carrier buffers and drop voice, while Tc too small wastes CPU and can under-run the committed rate.
Formula
Traffic Shaping
Bc = CIR × Tc, so Tc = Bc ÷ CIR; the shaper releases Bc bits every Tc and 1000 ÷ Tc intervals fit in a second.
- CIR
- Long-term average rate the shaper enforces
- Tc
- Token replenishment interval, typically 4–10 ms for voice
- Be
- Extra bucket depth that lets unused credit be spent later
Worked example
With the default values below, Traffic Shaping Calculator returns Committed Burst Bc of 500,000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Committed information rate (CIR)accepts 0.064–100,000 Mbps
- 50 Mbps
- Shaping interval Tcaccepts 1–500 ms
- 10 ms
- Excess burst as share of Bcaccepts 0–200 %
- 50 %
- Physical line rateaccepts 1–400,000 Mbps
- 1,000 Mbps
Results
- Committed Burst Bc
- 500,000 bits
- Committed Burst Bc
- 62,500 bytes
- Excess Burst Be
- 250,000 bits
- Shaping Intervals per Second
- 100
- Time to Send a Full Burst at Line Rate
- 0.750 ms
Step by step
- 1Values used
- 2Traffic Shaping
- 3Committed Burst Bc= 500,000 bits
- 4Committed Burst Bc= 62,500 bytes
- 5Excess Burst Be= 250,000 bits
- 6Shaping Intervals per Second= 100
- 7Time to Send a Full Burst at Line Rate= 0.750 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 3 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
How is Traffic Shaping calculated?
Bc = CIR × Tc, so Tc = Bc ÷ CIR; the shaper releases Bc bits every Tc and 1000 ÷ Tc intervals fit in a second. A shaper is a bucket refilled with Bc bits every Tc milliseconds; traffic is metered out at line rate until the bucket empties, then waits for the next interval. Small Tc values give smoother output and lower jitter, at the cost of more scheduler work.
Why does Traffic Shaping matter?
Tc chosen too large produces bursts long enough to overflow carrier buffers and drop voice, while Tc too small wastes CPU and can under-run the committed rate.
What values do I need to enter?
This calculator takes 4 inputs: Committed information rate (CIR), Shaping interval Tc, Excess burst as share of Bc, Physical line rate. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
