How many combinations does a Rubik's Cube have? A 3x3 cube has exactly 43,252,003,274,489,856,000 states, or about 43 quintillion for short. This number is not a guess: anyone can work it out with nothing but multiplication. This post counts it with you step by step, with a picture on an EasyRubic cube for each step, and then explains why every state can be solved in 20 moves.
Find your case fast
Look at your cube from above and tap the picture that matches it to see how to solve it. Grey cells are stickers you can ignore.
Every move sequence in this post was tried out on the EasyRubic cube simulator, and every sum was double-checked by computer.
What is a state?
A state is one arrangement of the colours on the cube that you can reach just by turning the faces. A solved cube is one state. Turn one face and you are already in a different state. Just three moves, F R U, give you a cube that looks fairly scrambled:
See it in 3D, before and after
- You start with (input)
- After the formula
The picture on the left is the cube after those three moves, and the one on the right is the solved cube. If the letters R, U and F are new to you, see Rubik's Cube notation for beginners.
When we count, we do not take the cube apart. We only count the states that turning by hand can make. This matters, because it makes the number 12 times smaller, as you will see near the end.
The six centres stay put
A 3x3 cube has 26 pieces you can see: 6 centres, 8 corners and 12 edges. A centre only spins in place and never swaps with another centre: white is always opposite yellow, and red is always opposite orange. So we treat the six centres as a fixed "frame", and we only need to count the ways to arrange the corners and edges.
Step 1: put the 8 corners into 8 slots
There are 8 slots for corners. The first corner has 8 slots to choose from, the second has 7 left, the third has 6, and so on until the last one has just 1 slot left:
8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320 ways.
In maths, this product is written as 8! for short (said "8 factorial").
Step 2: twist the 8 corners
Each corner has three coloured stickers, so once it sits in a slot it can face 3 ways. If all 8 corners could twist freely, there would be 3 to the power of 8 ways. But a real cube does not allow that: you cannot twist just one corner on its own. Once seven corners have their twist, the twist of the eighth is forced.
So there are only 3 to the power of 7 = 2,187 ways to twist the corners.
You can see this rule for yourself. Doing R' D' R D twice twists the front-right corner of the top layer one way. Turn U to bring the next corner into that spot, do the sequence four times, then turn U' to put it back. The result: two top-layer corners are twisted, in opposite directions, and every other piece is back where it was.
See it in 3D, before and after
- You start with (input)
- After the formula
The two corners always "balance out" each other. There is no way to twist just one.
Putting steps 1 and 2 together, the corners have 40,320 × 2,187 = 88,179,840 states.
Step 3: put the 12 edges into 12 slots
The counting works like step 1: 12 × 11 × ... × 1 = 12! = 479,001,600 ways.
But there is another rule here: you cannot swap exactly two pieces while leaving everything else the same. Each face turn moves 4 corners and 4 edges at once, so the "swaps" of the corners and of the edges always come in pairs. If two edges swap places, two corners must swap too.
The T-perm is the clearest example. It swaps two corners and two edges at the same time:
R U R' U' R' F R2 U' R' U' R U R' F'
See it in 3D, before and after
- You start with (input)
- After the formula
This rule cuts the number of ways in half, because half of the arrangements can never be reached. Placing the edges leaves 479,001,600 ÷ 2 = 239,500,800 ways.
Step 4: flip the 12 edges
Each edge has two coloured stickers, so it has 2 ways to sit: the right way round or flipped. Just like the corners, you cannot flip just one edge on its own. The number of flipped edges is always even, so once 11 edges have their direction, the 12th is forced.
So there are 2 to the power of 11 = 2,048 ways to flip the edges.
This sequence flips exactly two top-layer edges (front and left) in place, and every other piece goes back where it was:
F R B L U L' U B' R' F' L' U' L U'
See it in 3D, before and after
- You start with (input)
- After the formula
Putting steps 3 and 4 together, the edges have 239,500,800 × 2,048 = 490,497,638,400 states.
Multiply it all together
The corners and edges are independent of each other (apart from the swap rule already counted in step 3), so we multiply the two parts:
| Part | Sum | Number of ways |
|---|---|---|
| Placing the corners | 8! | 40,320 |
| Twisting the corners | 3 to the power of 7 | 2,187 |
| Placing the edges | 12! ÷ 2 | 239,500,800 |
| Flipping the edges | 2 to the power of 11 | 2,048 |
| Total | 88,179,840 × 490,497,638,400 | 43,252,003,274,489,856,000 |
This is exactly the number Wikipedia gives in the Permutations section of its Rubik's Cube article, with the same formula 8! × 3 to the power of 7 × 12!/2 × 2 to the power of 11 (Wikipedia). The cube20.org site by Tomas Rokicki's team uses this number too (cube20.org).
How big is 43 quintillion?
A quintillion is a billion times a billion. A few ways to picture it:
- If you looked at one state every second, with no sleep and no breaks, it would take you about 1,370 billion years to see them all. (We worked this out ourselves: 43 quintillion seconds divided by the number of seconds in a year.) - According to Wikipedia, if you had one normal-sized Rubik's Cube for every state, those cubes could cover the whole surface of the Earth 275 times, or stack into a tower 261 light years high (Wikipedia). ## Repeat any sequence and you always come back
The number of states is huge, but it has an end. A fun result: repeat any sequence enough times and the cube always returns to where it started.
The "sexy move" R U R' U' done 6 times brings the cube back to how it was. Here it is after one go:
- You start with (input)
- After the formula
The two-move sequence R U needs 105 goes to come back. Both numbers were counted on the EasyRubic simulator. Try it on a real cube: doing R U R' U' six times is a great way to get the hang of notation.
What if you take the cube apart and put it back together?
The three rules above (no twisting just one corner, no flipping just one edge, no swapping exactly two pieces) only hold when you turn the faces. If you take the cube apart and put it back together any way you like, all three rules are gone:
- Corner twist: 3 to the power of 8 instead of 3 to the power of 7, 3 times as many.
- Edge flip: 2 to the power of 12 instead of 2 to the power of 11, 2 times as many.
- Edge placing: 12! instead of 12!/2, 2 times as many.
That adds up to 3 × 2 × 2 = 12 times as many, or about 519 quintillion ways to put it together (exactly 519,024,039,293,878,272,000). Wikipedia says only one twelfth of them can be solved (Wikipedia). In other words, if you put the pieces back at random, 11 times out of 12 you will get a cube that can never be solved. The post Unsolvable Rubik's Cube shows how to spot and fix it.
God's Number: every state can be solved in 20 moves
With 43 quintillion states, the natural question is: how many moves does the hardest state need? Cubers call this number God's Number, because it is the number of moves someone who "knows everything" would need in the worst case.
The answer is 20. According to cube20.org, in July 2010 Tomas Rokicki, Herbert Kociemba, Morley Davidson and John Dethridge proved this, using about 35 CPU-years of computer time donated by Google (cube20.org). Here a "move" means turning a face 90 or 180 degrees, so U2 counts as one move. If you only count 90-degree turns (so U2 is two moves), God's Number is 26, also according to cube20.org.
The first state proven to need exactly 20 moves is the superflip: every piece is in its right slot, but all 12 edges are flipped. According to cube20.org, Michael Reid proved this in 1995. Here is a 20-move sequence that makes the superflip, from Wikipedia (Wikipedia):
U R2 F B R B2 R U2 L B2 R U' D' R2 F R' L B2 U2 F2
- You start with (input)
- After the formula
On the left is the superflip: every corner and centre is right, and all 12 edges are flipped. Do the sequence one more time and the cube is back to how it was.
Note: 20 moves is the shortest solution, found by a computer. People solving by hand use far more moves, because they follow a method that is easy to remember, such as CFOP, rather than hunting for the shortest solution.
What about the 2x2?
A 2x2 cube has only 8 corners and no fixed centres. According to Wikipedia, it has 3,674,160 states, worked out as 8! × 3 to the power of 7 and then divided by 24, because with no centres you have to remove the 24 different ways of holding the cube (Wikipedia). Every 2x2 state can be solved in 11 moves (or 14 if you only count 90-degree turns). Want to solve one yourself? See How to solve a 2x2 Rubik's Cube for beginners.
Summary of the sequences in this post
Each sequence comes with its picture. Hold the cube with white on top.
- Twist two corners: R' D' R D twice, U, four times, U'
See it in 3D, before and after
- You start with (input)
- After the formula
- T-perm, swaps two corners and two edges: R U R' U' R' F R2 U' R' U' R U R' F'
See it in 3D, before and after
- You start with (input)
- After the formula
- Flip two edges: F R B L U L' U B' R' F' L' U' L U'
See it in 3D, before and after
- You start with (input)
- After the formula
- Sexy move, six times brings it back: R U R' U'
- You start with (input)
- After the formula
- Superflip, 20 moves: U R2 F B R B2 R U2 L B2 R U' D' R2 F R' L B2 U2 F2
- You start with (input)
- After the formula
Try it on your own cube
With the EasyRubic app, you can scan your real cube with the camera and follow the solution step by step on a 3D cube. Get EasyRubic and pick one of the 43 quintillion states for yourself.
Video
Want to see it in motion? The short video below from the CHIEN MATH channel on YouTube shows more about this topic (it is in Vietnamese). The video belongs to that channel and is embedded straight from YouTube.
Sources
Frequently asked questions
How many combinations does a 3x3 Rubik's Cube have?
43,252,003,274,489,856,000 states, about 43 quintillion. The number comes from 8! × 3 to the power of 7 × 12!/2 × 2 to the power of 11.
Why is it not 3 to the power of 8 and 2 to the power of 12?
Because when you only turn the faces, you cannot twist just one corner or flip just one edge. The direction of the last corner and the last edge is always forced by the other pieces.
What is God's Number?
It is the most moves needed to solve any state the shortest way. For the 3x3 cube this number is 20 (counting U2 as one move), and it was proven in 2010.
Are there states that need exactly 20 moves?
Yes, lots of them. The superflip, the state where all 12 edges are flipped, was the first state proven to need exactly 20 moves.
How many ways are there if you take the cube apart and put it back together?
About 519 quintillion, 12 times the number of states you can reach by turning. Only one twelfth of them can be solved, so always put the pieces back as a solved cube.
How many combinations does a 2x2 Rubik's Cube have?
3,674,160 states, and every one of them can be solved in 11 moves.


