Database Sharding Calculator
Size a shard set from data volume, throughput and per-shard capacity.
About Database Sharding Calculator
Shard count is set by whichever constraint binds harder, capacity or throughput. Key skew must be included because the hottest shard determines whether the system copes, not the average. Choosing a shard key that distributes evenly matters more than shard count, because skew cannot be fixed by adding shards.
Formula
Database Sharding
Shards = max(data ÷ shard capacity, skewed writes ÷ shard write capacity)
- skew
- Uneven key distribution making some shards hotter than average
- binding constraint
- Whichever of capacity or throughput needs more shards
Worked example
With the default values below, Database Sharding Calculator returns Shards Required of 16. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Total data volumeminimum 0 GB
- 8,000 GB
- Total writes per secondminimum 0
- 40,000
- Data capacity per shardminimum 0.001 GB
- 500 GB
- Write capacity per shardminimum 0.001
- 4,000
- Expected key distribution skewaccepts 0–100 %
- 25 %
Results
- Shards Required
- 16
- Shards Needed for Data Volume
- 16
- Shards Needed for Write Throughput
- 13
- Data per Shard
- 500.000 GB
- Writes on the Hottest Shard
- 3,125
Step by step
- 1Values used
- 2Database Sharding
- 3Shards Required= 16
- 4Shards Needed for Data Volume= 16
- 5Shards Needed for Write Throughput= 13
- 6Data per Shard= 500.000 GB
- 7Writes on the Hottest Shard= 3,125
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, 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 Database Sharding calculated?
Shards = max(data ÷ shard capacity, skewed writes ÷ shard write capacity) Shard count is set by whichever constraint binds harder, capacity or throughput. Key skew must be included because the hottest shard determines whether the system copes, not the average.
Why does Database Sharding matter?
Choosing a shard key that distributes evenly matters more than shard count, because skew cannot be fixed by adding shards.
What values do I need to enter?
This calculator takes 5 inputs: Total data volume, Total writes per second, Data capacity per shard, Write capacity per shard, Expected key distribution skew. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
