Kafka Partition Calculator
Size Kafka topic partitions from throughput and consumer parallelism.
About Kafka Partition Calculator
A partition can only be read by one consumer within a group, so consumer count sets a floor on partitions. Adding consumers beyond the partition count leaves them idle rather than increasing throughput. Partitions can be added but never removed from a topic, so under-provisioning is recoverable while over-provisioning is permanent.
Formula
Kafka Partition
Partitions = max(throughput ÷ per-partition throughput, consumer count)
- partition
- The unit of parallelism; one partition is consumed by at most one consumer in a group
- replication factor
- Copies of each partition, each consuming full storage
Worked example
With the default values below, Kafka Partition Calculator returns Partitions Required of 8. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Target throughputminimum 0.01 MB/s
- 60 MB/s
- Throughput per partitionminimum 0.01 MB/s
- 10 MB/s
- Consumers in the groupminimum 1
- 8
- Retention periodminimum 0 h
- 72 h
- Replication factoraccepts 1–10
- 3
Results
- Partitions Required
- 8
- Partitions Needed for Throughput
- 6
- Storage Required
- 45,562.50 GB
- Throughput per Consumer
- 7.500 MB/s
- Verdict
- Partition count is set by consumer parallelism rather than throughput
Step by step
- 1Values used
- 2Kafka Partition
- 3Partitions Required= 8
- 4Partitions Needed for Throughput= 6
- 5Storage Required= 45,562.50 GB
- 6Throughput per Consumer= 7.500 MB/s
- 7Verdict= Partition count is set by consumer parallelism rather than throughput
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or fees or charges 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 Kafka Partition calculated?
Partitions = max(throughput ÷ per-partition throughput, consumer count) A partition can only be read by one consumer within a group, so consumer count sets a floor on partitions. Adding consumers beyond the partition count leaves them idle rather than increasing throughput.
Why does Kafka Partition matter?
Partitions can be added but never removed from a topic, so under-provisioning is recoverable while over-provisioning is permanent.
What values do I need to enter?
This calculator takes 5 inputs: Target throughput, Throughput per partition, Consumers in the group, Retention period, Replication factor. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Related Calculators
You might also need
- Database Connection Pool CalculatorCommonly used together
- Elasticsearch Shard CalculatorCommonly used together
- Redis Memory CalculatorCommonly used together
- Password GeneratorAlso in Developer & Networking
- 4K Streaming DataAlso in Developer & Networking
- Accessibility Contrast CalculatorAlso in Developer & Networking
