About the Pyramid Block Calculator
This calculator counts the blocks, weight, and cost needed to build a solid, square, stepped pyramid — the shape you get when you stack blocks (or cans, oranges, cannonballs) so each layer is one block narrower per side than the layer below it. Give it the number of layers, a block's edge length, and its weight and price, and it returns the exact block count and material totals using a closed-form formula — no simulation or estimation involved.
The formula: square pyramidal numbers
Picture the pyramid from the apex down. The top layer is a single block (1 × 1 = 1). The next layer down is 2 × 2 = 4 blocks. The layer after that is 3 × 3 = 9 blocks, and so on, until the base layer — layer n — is n × n blocks. The total block count for the whole pyramid is the sum of these squares:
Total blocks = 1² + 2² + 3² + ... + n² = n(n + 1)(2n + 1) / 6
This sum has a name: the square pyramidal numbers — 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, ... for n = 1 through 10. It is a classic result in combinatorics, provable by induction or by a direct counting argument, and it is exact for any whole number of layers.
From block count to weight and cost
Once the total block count is known, weight and cost follow by simple multiplication: total weight = total blocks × weight per block, and total cost = total blocks × price per block. The calculator also reports the base layer alone (n²), since that is usually the layer that determines footprint and the bulk of material you will need to source first.
Assumptions
- Blocks are treated as uniform cubes with edge length s; the pyramid height is n × s and the base footprint is n × s per side, assuming layers stack directly with no mortar gap.
- Every layer shrinks by exactly one block per side moving up (a "stepped" pyramid), not a smooth-sided solid pyramid with sloped faces.
- The block count is exact math with no waste, breakage, or mortar allowance included — add your own margin (commonly 5-10%) for a real build.
How to get the best results
- Enter the number of layers as a whole number — this is both the pyramid's height in blocks and the base's width in blocks.
- Use consistent units for block edge length (inches here); convert first if your blocks are measured in centimeters or feet.
- Leave weight or cost at 0 if you only want the block count — the other results will simply read $0 or 0 lb.