Back to blog

Cube mathematics

How Many Rubik's Cube Combinations Exist? The Math Behind 43 Quintillion and God's Number 20

You have probably heard that a 3x3 cube has 43 quintillion states and can always be solved in 20 moves. Here is the exact math behind both numbers—and how 2x2 and 4x4 compare.

By Solve My Cube Editorial Team8 min read

Few puzzles balance simple mechanics with staggering mathematical depth like the 3x3 cube. Six colored faces and 20 movable pieces generate 43,252,003,274,489,856,000 legal configurations—yet every single one of those 43 quintillion positions is at most 20 moves away from solved.

You do not need a university degree in group theory to derive that number yourself. Every factor in the formula maps directly to physical pieces you can hold in your hand—and explains the exact validation laws enforced inside our 3x3 cube solver and 2x2 cube solver.

Deriving 43,252,003,274,489,856,000 piece by piece

On a standard 3x3 cube, the six center pieces stay fixed relative to each other, leaving 8 corners and 12 edges that can move and rotate. Counting all ways to assemble those pieces—then dividing out the physically unreachable orbits—gives the exact figure:

FactorExpressionValuePhysical Meaning
Corner positions8!40,320Ways to arrange 8 distinct corner pieces in 8 corner slots
Corner orientations3^7 (not 3^8)2,1877 corners can twist 3 ways each; the 8th twist is forced (÷3)
Edge positions12!479,001,600Ways to arrange 12 distinct edge pieces in 12 edge slots
Edge orientations2^11 (not 2^12)2,04811 edges can flip 2 ways each; the 12th flip is forced (÷2)
Permutation parity÷ 20.5Total swaps must be even; single 2-piece swaps are impossible (÷2)
Total solvable 3x3 states(8! × 3^7 × 12! × 2^11) / 243,252,003,274,489,856,000Exactly 1/12 of all mechanical piece assemblies

Comparing 2x2, 3x3, and 4x4 state spaces

Adding just one layer per dimension changes the puzzle's combinatorial scale dramatically:

Cube SizeMovable PiecesReachable CombinationsGod's Number (HTM / QTM)
2x2 Pocket Cube8 corners (1 fixed as reference)3,674,160 (7! × 3^6)11 HTM / 14 QTM
3x3 Classic Cube8 corners + 12 edges4.325 × 10^1920 HTM / 26 QTM
4x4 Rubik's Revenge8 corners + 24 wings + 24 centers~7.40 × 10^45Exact value unknown (bounded ~35–55)

What is God's Number (and HTM vs. QTM)?

God's Number is the minimum number of moves required to solve the worst possible scrambled position on a puzzle—imagining an omniscient solver who always picks the shortest path.

The exact number depends on how you count a 180-degree turn like R2:

  • Half-Turn Metric (HTM = 20 on 3x3): Counts any single-face turn—90° clockwise, 90° counterclockwise, or 180° double turn—as 1 move. This is the standard metric used in WCA Fewest Moves and most solver outputs.
  • Quarter-Turn Metric (QTM = 26 on 3x3): Counts only 90° face turns as 1 move, so a 180° turn like R2 counts as 2 moves. In QTM, the proven maximum distance on a 3x3 is 26 moves.

How mathematicians proved God's Number is 20

For decades, lower bounds climbed slowly upward while upper bounds came down. In 1995, Michael Reid proved that the famous 'Superflip' position—where every piece sits in its home slot, corners are solved, and all 12 edges are flipped in place—requires at least 20 HTM moves, establishing 20 as the lower bound.

In July 2010, Tomas Rokicki, Herbert Kociemba, Morley Davidson, and John Dethridge closed the gap completely. Using symmetry reductions, Kociemba's coset decomposition (dividing all 43 quintillion states into 2.2 billion cosets reduced by symmetry to ~55.8 million sets), and roughly 35 CPU-years of donated compute time, they proved that every single legal 3x3 state can be solved in 20 HTM moves or fewer. Even more surprisingly, the vast majority of random scrambles sit at distance 17 or 18—positions requiring all 20 moves are extraordinarily rare (fewer than 500 million out of 43 quintillion).

Try the famous 20-move Superflip yourself

Want to see a true distance-20 position in action? Copy this classic 20-move Superflip sequence into our 3x3 cube algorithm player to watch all 12 edges flip in place while every corner stays untouched: U R2 F B R B2 R U2 L B2 R U' D' R2 F R' L B2 U2 F2.

Explore algorithms and solvers

Editorial review and corrections

Every algorithm, cube invariant, and notation example in this guide is tested against our browser solver and 3D algorithm player. Spot an error or unclear step?

FAQ

Does a 20-move scramble guarantee a distance-20 position?

No. Most random 20-move scrambles can actually be solved in 17 or 18 optimal moves because paths intersect in the cube graph. True distance-20 positions make up less than one-billionth of one percent of all 3x3 states.

Why does the 2x2 formula use 7! instead of 8!?

Because a 2x2 has no fixed center pieces, rotating the entire solved cube in space produces 24 equivalent orientations. Fixing one corner piece in place removes those 24 whole-cube rotations, leaving 7! × 3^6 = 3,674,160 distinct states.

What is the most common optimal solution length for a random 3x3 scramble?

Roughly two-thirds of all 43 quintillion 3x3 positions have an optimal half-turn solution length of 18 moves, and nearly another quarter take 17 moves.