Every move is a letter naming a face of the cube. The cube stays visible behind this guide — press Try on anything to watch it happen.
The hidden sides are their opposites: L left, B back, D down. Faces are named from your point of view — whichever side faces you is F.
Clockwise means as if you were looking straight at that face. So B turns the opposite way from F when seen from the front — try both!
The same three forms work on every face. All 18 possible face turns — click any to watch:
Algorithms read left to right, one move at a time. The most famous one, the “sexy move”:
Repeat it six times from a solved cube and everything returns to where it started. Undo works on tried moves, so experiment freely.
Three more families of moves — and the ' and 2 modifiers work on all of them too (M', x2, r' …).
No stickers change place relative to each other — a rotated solved cube is still solved.
A lowercase face letter turns that face plus the slice next to it. Also written with a w: r = Rw.
On 4×4 and up, a number in front picks how deep. A bare number turns just that one inner layer; with a w it turns that many outer layers together. (Buttons grey out if the move doesn’t exist on the current cube size.)
Slice moves M E S exist only on odd sizes (3, 5, 7) — even cubes have no middle layer. Rotations x y z work on every size.
Every position of the Rubik’s Cube — all 43,252,003,274,489,856,000 of them — can be solved in 20 moves or fewer. That worst-case number is called God’s Number: the number of moves an all-knowing solver would ever need.
For any scramble there is some shortest possible solution. God’s Number is the longest of all those shortest solutions — the diameter of the cube’s universe. In the half-turn metric (where R and R2 each count as one move) it is exactly 20; in the quarter-turn metric it is 26.
The superflip — every piece in place, every edge flipped — was proven in 1995 to require the full 20 moves. It looks like this (works on the 3×3):
| 1981 | ≤ 52 | Thistlethwaite’s nested-group algorithm |
| 1995 | ≤ 29 | Reid — and proves the superflip needs 20 |
| 1992–2008 | ≤ 22 | Kociemba’s two-phase idea, refined by Rokicki |
| 2010 | = 20 | Rokicki, Kociemba, Davidson & Dethridge — about 35 CPU-years donated by Google checked every position |
Knowing 20 is enough doesn’t make it fast to find a 20-move solution — truly optimal solving still takes a long search per scramble. The Kociemba tab here uses his two-phase algorithm: it first maneuvers the cube into a friendly subgroup, then finishes it, giving ~19–23 move solutions in milliseconds. Short, but not guaranteed shortest.
The 2×2 is small enough to search exhaustively: its God’s Number is 11, and the Optimal tab really does return a shortest-possible solution.