• Foundation
  • About 12 min
  • 5 practice questions

Counting cubes in stacks, staircases and plans

Count the unit cubes in a stack by layers, in a staircase by columns, and from a plan that gives the height of each column, and decide how many are hidden from view.

If something looks wrong, please tell us.

Many cube questions show a solid made of unit cubes and ask how many cubes it contains or how many you can see. Hidden cubes are the trap, because the picture shows only the outside. The remedy is to count in an organised way: by layers, by columns, or from a plan that records the height of every column.

Counting by layers

Slice the solid horizontally and count each layer. A square pyramid whose layers are 4 by 4, 3 by 3, 2 by 2 and 1 by 1 has 16 plus 9 plus 4 plus 1, which is 30 cubes. Remember that a layer may be hollow only if the question says so; unless it does, every layer is a full block.

Counting by columns: staircases

A staircase has columns of increasing height. A staircase with columns of 1, 2, 3 and 4 cubes has 1 plus 2 plus 3 plus 4, which is 10 cubes. In general a staircase of n steps has n(n + 1)/2 cubes.

Cubes in a staircase
Steps n12345
Cubes1361015

Counting from a plan

A plan is a grid, seen from above, in which each square carries the height of the column of cubes standing on it. The total number of cubes is the sum of all the numbers. Here is a plan with three rows (front row first) and three columns.

Heights of the columns
Column 1Column 2Column 3
312
221
111

The total is 3 plus 1 plus 2, plus 2 plus 2 plus 1, plus 1 plus 1 plus 1, which is 14 cubes. Seen from the front you look along each column of the plan and see the tallest stack in it: 3, 2 and 2, so the front view contains 7 unit squares. From the left you see the tallest in each row: 3, 2 and 1, so that view contains 6 unit squares.

Count by layers, by columns, or by adding the heights in a plan. A view from one side shows only the tallest stack in each line of sight.

— Rule to remember

Hidden cubes

In a solid n by n by n cube, the cubes that cannot be seen from outside form an (n minus 2) by (n minus 2) by (n minus 2) block inside. For n = 3, there is 1 hidden cube and 26 on the outside. For n = 4 the hidden block is 2 by 2 by 2, which is 8 cubes, so 56 cubes are on the outside.

Worked examples

Example 1. A solid is built in layers of 4 by 4, 3 by 3 and 2 by 2 cubes, and each layer sits inside the outline of the one below. Total cubes: 16 plus 9 plus 4 is 29.

Example 2. A 3 by 3 by 3 cube is made of unit cubes. How many cubes touch the outside? The hidden cube in the middle is 1, so 27 minus 1 is 26.

Example 3. A plan shows heights 2, 1, 3 in the front row and 1, 1, 2 in the back row. Total cubes: 2 plus 1 plus 3 plus 1 plus 1 plus 2, which is 10.

Key takeaways

  • Choose a counting scheme before you start: layers, columns or plan.
  • A staircase of n steps has n(n + 1)/2 cubes.
  • A view from one side shows only the tallest column along each line of sight.
  • In an n by n by n cube the hidden block is (n - 2) cubed.

Check your understanding

  1. 1. A staircase has columns of 1, 2, 3, 4 and 5 cubes. How many cubes does it have?

    1. 25
    2. 10
    3. 20
    4. 15
    Show answer

    Answer: D. 1 plus 2 plus 3 plus 4 plus 5 is 15.

  2. 2. A pyramid has layers of 4 by 4, 3 by 3, 2 by 2 and 1 by 1 cubes. How many cubes does it have?

    1. 10
    2. 30
    3. 20
    4. 40
    Show answer

    Answer: B. 16 plus 9 plus 4 plus 1 is 30.

  3. 3. A plan shows column heights 2, 1, 3 in the front row and 1, 1, 2 in the back row. How many cubes are there in all?

    1. 10
    2. 8
    3. 9
    4. 12
    Show answer

    Answer: A. 2 plus 1 plus 3 plus 1 plus 1 plus 2 is 10.

  4. 4. A 4 by 4 by 4 cube is made of unit cubes. How many of the unit cubes cannot be seen from outside?

    1. 16
    2. 4
    3. 8
    4. 24
    Show answer

    Answer: C. The hidden cubes form a 2 by 2 by 2 block, which is 8 cubes.

  5. 5. In the plan with front row 3, 1, 2, middle row 2, 2, 1 and back row 1, 1, 1, how many unit squares does the front view contain?

    1. 6
    2. 7
    3. 9
    4. 14
    Show answer

    Answer: B. Looking from the front, the tallest stack in each column is 3, 2 and 2. So 3 plus 2 plus 2 is 7.

Privacy · Terms · Refunds · Delivery