🗃

Database Shard Size Calculator

Calculate the number of database shards required based on data growth projections, shard size limits, and replication factor.

Current total data size in gigabytes.
Maximum allowed data per shard. MongoDB recommends < 200 GB per shard.
Expected annual data growth percentage.
Number of years to plan ahead for capacity.
Number of data copies for fault tolerance (MongoDB default = 3).

Results

Projected Data Size1,728 GB
Shards Required18
Total Storage (with replication)5,184 GB

📖What is it?

For informational/educational purposes only. Database sharding horizontally partitions data across multiple nodes to scale beyond single-server limits. Planning shard count requires estimating future data size based on current size and growth rate.

🎯How to use

Enter your current total data size, the maximum shard size your database supports, annual growth rate, planning horizon in years, and replication factor. The calculator projects future data size and the number of shards you will need.

💡Example scenario

1 TB current data, 20% annual growth, 3-year horizon: projected size = 1,728 GB. With 100 GB max shard size: 18 shards needed. With 3� replication: 5,184 GB total storage required.

🏆Pro tip

Choose a shard key with high cardinality and even write distribution to avoid hot shards. Plan for re-sharding by leaving 20-30% headroom per shard. Consider chunk migration overhead during peak hours when adding shards.