God's number explained: 20 moves solve any cube
God's number is 20. However badly you scramble a standard 3 by 3 cube, it can be solved in 20 face turns or fewer, and some positions need every one of those 20. The catch is the phrase "face turns": count moves another way and the answer becomes 26. This post explains what the number means, how it was pinned down over 30 years, and why the way you count a move changes it, with a worked example you can count yourself.
What God's number means
Imagine a solver who always knows the shortest way back to solved. The name comes from that idea of an all-knowing being. Give this solver every possible scramble, one at a time, and write down how many moves each one takes. The biggest number on the list is God's number. A method that always finds those shortest solutions is called God's algorithm.
So God's number is a worst case. It is not how many moves a typical scramble needs, and it says nothing about how fast a person can find a solution. It only says that no scramble is further from solved than this.
Why the answer is 20 or 26: how you count a move
Cube moves are written in letters. R means a quarter turn of the right face clockwise, R' means the same face the other way, and R2 means a half turn. The letters L, F, B, U and D work the same way for the left, front, back, up and down faces.
There are two common ways to count:
- Face turns. Any turn of one face is one move, so R, R' and R2 each count as 1. Here God's number is 20.
- Quarter turns. Only a quarter turn is one move, so R2 counts as 2. Here God's number is 26.
A third way counts a turn of a middle layer as one move too. For that count the exact number is still unknown: it is at least 18 and at most 20. When people say "God's number is 20" without more detail, they mean face turns.
A worked example: count one sequence two ways
Take the sequence R U2 R' F2. It has four turns, so it is 4 moves in face turns. In quarter turns, U2 and F2 each count as 2, so it is 1 + 2 + 1 + 2 = 6. Same cube, same turns, two different totals. Try it on any sequence you know: every half turn adds one extra quarter-turn move, which is why the quarter-turn worst case is higher.
How many positions a cube has
A 3 by 3 cube can reach 43,252,003,274,489,856,000 positions, about 43 billion billion. That size is why nobody could simply solve every position one by one.
It also gives a quick lower limit. Count every position you can reach from solved in 17 face turns or fewer, and you get about 20 billion billion, fewer than half of all positions. So some positions must need at least 18 moves. For many years that counting argument was the best lower limit anyone had.

Most random scrambles need 17 or 18 face turns at best; 20 is very rare. Figures from Wikipedia.
The chart shows how rare the worst case is. About 67.0% of random scrambles are at best 18 moves from solved, about 26.7% need 17, about 3.4% need 19, about 2.6% need 16, and about 0.2% need 15. Only about 1 scramble in 90 billion needs the full 20. These figures, and the dates below, come from Wikipedia's page on optimal solutions for the cube.
How God's number was proven
The answer was closed in from both sides.
- 1980: the mathematician David Singmaster guessed the number would be 20.
- 1992 and 1995: Dik T. Winter found a 20 face turn solution for a position called the superflip, and in 1995 Michael Reid showed no shorter one exists. That made 20 the new lower limit.
- 2008: Tomas Rokicki showed every position can be solved in 25 moves or fewer, then 23, then 22 by August.
- 2010: Rokicki, Herbert Kociemba, Morley Davidson and John Dethridge finished a computer-assisted proof that every position can be solved in 20 face turns. The upper limit met the lower limit, so the answer was exactly 20.
- 2014: Rokicki and Davidson proved the quarter-turn answer is 26, after Rokicki had shown 29 was enough in 2009.
The superflip: a cube that looks almost solved
In the superflip, every corner piece is in its correct position, but every edge piece is flipped the wrong way round. It looks close to done, yet it needs the full 20 face turns. When Michael Reid proved that in 1995, it set the lower limit of 20 that the 2010 proof finally matched.
If you have ever met a single flipped edge on your own cube, flipped edges and why they come in pairs covers what is going on.
What it means for people who solve cubes
For an everyday solve, God's number is a comfort more than a tool: no scramble is hopeless, and every one is at most 20 face turns from solved. Finding that shortest path is a different problem.
Some people do try. The World Cube Association runs a 3x3x3 Fewest Moves event, where solvers get time to search for a short solution by hand, and people in it have found optimal solutions of 16, 17 and 18 moves to random scrambles.
Counting quarter turns in a cube game
3D 2048 is the 2048 puzzle on a cube you turn like a Rubik's cube, with six faces of nine squares. It is a number puzzle, not a cube solver, and it will not teach you to solve a cube. But it counts moves in a way that makes the metrics above easy to feel.

The game's How to play box: each twist turns one layer a quarter.
- Every twist is a quarter turn. The game says "That layer turns a quarter". On a keyboard, 1, 2 and 3 twist a row and 4, 5 and 6 a column, and Shift twists the other way. Each twist adds 1 to Moves, so a half turn of a layer costs 2, as in the quarter-turn count.
- Middle layers count as one. The middle row and middle column twist just like the outer ones and cost 1 each, much like M, E and S moves in the slice count.
- Turning the whole cube is free. Shift and an arrow key turns the cube without using a move. On a real cube these are the whole-cube rotations x, y and z, which turn the puzzle without turning one layer against another.
There is one big difference: in 3D 2048 every twist also adds a new tile, so a wasted twist costs you space as well as a move. The full key list is in 2048 keyboard controls.
Frequently asked questions
Is God's number really 20?
Yes, for the 3 by 3 cube when any turn of a face counts as one move. When a half turn counts as two quarter turns, it is 26.
Who proved God's number is 20?
Tomas Rokicki, Herbert Kociemba, Morley Davidson and John Dethridge, with a computer-assisted proof in 2010. Michael Reid had shown in 1995 that the superflip needs 20.
How many moves does a random scramble need?
Usually 17 or 18 face turns at best. About 1 scramble in 90 billion needs the full 20.
Does counting middle layer moves change the answer?
Yes. If a middle layer turn counts as one move, the exact worst case is still unknown; it lies between 18 and 20.
Get started
Open 3D 2048, press H to read how it plays, and watch the Moves counter as you twist: each quarter turn is one move, and turning the whole cube is free. It plays in your browser on a computer or a phone.
Comments
No comments yet.
Sign in or make an account to comment.