# Rate limit calculator

Work out how a token-bucket rate limit behaves for your traffic, and how many requests get throttled.

## How it works

A token bucket refills at the limit divided by the window, and holds up to the burst size. Each request takes one token; with none left, the request is throttled.

```
rate = limit ÷ window
```

## Questions

### What status should a throttled request get?

429 Too Many Requests, with a Retry-After header.

### Per client or global?

Per client protects fairness; a global limit protects the service. Many APIs use both.

## Related tools

- [Core Web Vitals checker](https://powertraces.com/tools/core-web-vitals)
- [Cron expression explainer](https://powertraces.com/tools/cron-explainer)
- [Timeout & retry planner](https://powertraces.com/tools/timeout-retry)
- [SLO & error budget calculator](https://powertraces.com/tools/slo-error-budget)

[All tools](https://powertraces.com/tools)
