Database Partition Size Calculator

Enter your table row count, average row size, and target partition size to get partition count, size per partition, and storage estimates.

Table Parameters

Number of rows currently in (or expected in) the table.

Average bytes per row including all columns.

Maximum size each partition should reach.

Extra space for indexes, free pages, TOAST, etc.

Fill in the parameters on the left and click Calculate Partitions.

Summary

Enter your table row count, average row size, and target partition size to get partition count, size per partition, and storage estimates.

How it works

  1. Enter the total number of rows in your database table.
  2. Specify the average row size in bytes (or use the byte unit selector).
  3. Set your target partition size — the maximum size each partition should hold.
  4. The calculator outputs the recommended partition count, actual rows per partition, and total storage.
  5. Review the storage breakdown to plan disk capacity and rebalancing schedules.

Use cases

  • Plan MySQL, PostgreSQL, or MariaDB table partitioning before a large migration.
  • Estimate how many shards a Cassandra or MongoDB collection needs.
  • Size partitions for time-series tables where each partition covers a date range.
  • Capacity-plan disk storage for a growing transactional table.
  • Validate that existing partition counts are still appropriate after data growth.
  • Compare partition strategies by adjusting the target size and observing trade-offs.

Frequently Asked Questions

Last updated: 2026-07-22 · Reviewed by Nham Vu