Magic Cube

Task 174 ... Years 4 - 10


Blocks numbered from 1 to 27 have to be arranged in a cube so that the rows and columns of any slice, the pillars of the cube and the leading space diagonals of the cube each sum to the same total. (The diagonals of any slice are not required to sum to the magic number). When the puzzle was first conceived, in the Victorian Era, that was it. There were no clues ... and probably no blocks. However, to support students to begin, the card offers two clues. The magic total to aim for and some of the blocks already placed (assuming students can interpret the 2D representation of 3D space implied by the picture). Even with these clues, finding the solution requires careful step by step exploration and serious application of mental arithmetic.

Related Tasks



  • 27 cubes numbered from 1 - 27
  • About 22 blank cubes


  • 2D representation of 3D objects
  • algebra, generalisation in words & symbols
  • arithmetic, addition / subtraction
  • arithmetic, multiplication / division
  • history of mathematics
  • magic squares
  • mental arithmetic
  • numbers, cube
  • recording mathematics
Magic Cube


A task is the tip of a learning iceberg. There is always more to a task than is recorded on the card.

Completing the puzzle from the given clues may seem straightforward to teachers, but try it for yourself first. It takes a combination of discipline, mental calculation and decision making. In fact, the first decision is where to start. Eventually the cube will be completed. At this stage of the task there is only one answer:

The starting point is the leading space diagonal from 8 through 14 to the blank in the bottom left corner of the front slice.

Congratulate students on finding the solution and encourage further calculation by asking:

  • Which other diagonals also sum to 42?
    (Remember to check horizontal layers too.)
Encourage students to use isometric paper to copy the diagram on the card and record their solution. This should then be included in their journal. They might also like to find their own way to record the solution for someone else.

Invite students to think about the mathematicians of the 1800s who first explored this puzzle.

  • They were told the magic total, so how could they have worked it out?
Once the students have pondered this question, you might need to use their solution to help them understand. As the photograph shows, if you just look in one direction, let's say down the pillars:
  • There are 9 pillars.
  • Every one of the 27 numbers is shown.
  • Every pillar has to add to the same number.
  • The addition of those 9 additions must be the same as the total of the numbers 1 to 27.
So, working backwards, if you begin by adding the numbers from 1 - 27, then share that equally nine ways, this must be the magic total.
  • How will the students add the numbers from 1 - 27?
  • Can they check it another way?
Finding the magic total doesn't tell you how to arrange the numbers to make the magic cube, but at least you know what you are aiming for. However, the concept of 'looking in one direction', a variation of breaking the problem into smaller parts, can be used to work towards a solution. For example, if the first objective was to get the pillars correct, the original puzzlers needed to find 9 sets of 3 numbers which added to 42 and use all 27 numbers. Of course our students have already discovered lots of them but they might like to consider how the earlier mathematicians would have tackled this sub-problem.

The next phase is to arrange the 9 pillars so they work, then in each slice, change the order of blocks keeping them in the same pillar with a view to getting the rows correct. (Remember, each slice is not a magic square - the diagonals don't have to add to the magic total.)

Then pillars or rows can be rearranged within each slice (and layers can be interchanged) in order to get the columns of the horizontal layers correct and the leading space diagonals correct. Phew!!

Students don't have to go through this process, but they might be encouraged to try to record something about it in their journal to indicate that they understand something of the enormity of the original problem. However, if they do want to try out the process, you could inform them that there are 3 more distinct solutions other than the one they have already found and challenge them to find one. (There are also 24 reflection or rotation variations of the four solutions.)


  • What happens if there is a 4 x 4 x 4 magic cube? What would the magic total be?
  • What happens if there is a 5 x 5 x 5 magic cube? What would the magic total be?
  • What happens if there is a 6 x 6 x 6 magic cube? What would the magic total be?
  • What happens if there is a n x n x n magic cube? What would the magic total be?

Whole Class Investigation

Tasks are an invitation for two students to work like a mathematician. Tasks can also be modified to become whole class investigations which model how a mathematician works.

For this whole class lesson you need a set of cubes from 1 - 27 for each group of 2 or 4. You won't need the blanks because you won't be giving clues. Rather, tell the story of the Victorian era mathematicians who investigated this puzzle and work through the steps outlined above to 'discover' a magic cube. It's a great reasoning exercise with plenty of arithmetic practice. You might even discover more than one solution.

For more ideas and discussion about this investigation, open a new browser tab (or page) and visit Maths300 Lesson 85, Magic Cube, which includes clue diagrams like the one on the card for each of the four unique solutions and step by step instructions for making an 8 x 8 magic cube based on the instructions of F. A. Barnard in and 1888 publication.

Is it in Maths With Attitude?

Maths With Attitude is a set of hands-on learning kits available from Years 3-10 which structure the use of tasks and whole class investigations into a week by week planner.

The Magic Cube task is an integral part of:

  • MWA Number & Computation Years 9 & 10

The Magic Cube lesson is an integral part of:

  • MWA Number & Computation Years 9 & 10

Green Line
Follow this link to Task Centre Home page.