Kociemba two-phase · in your browser
3 x 3 Rubiks Cube Solver
Enter the colours of your 3×3 and this solver returns a solution of 20 moves or fewer, usually in about two hundred milliseconds. It is the standard Rubik’s cube — six faces, 54 stickers, 43 quintillion positions — and the answer arrives before you have finished reading this sentence. No download, no account, nothing sent to a server.
Move 1 of 20 — Front face clockwise
Solution
20 moves
The first 9 moves put every corner and edge the right way up and the middle-slice edges back in the middle slice. The last 11 finish the cube using only U, D and half turns.
Pick a colour, then click the squares
Tab to any square and press 1–6 to paint it. Hold the mouse down to drag across several at once.
Applies the moves to a solved cube. Useful if you already have a competition scramble and want to see how it is meant to come apart.
Why a 3x3 is exactly as hard as it is
Corners
8
3 orientations each
Edges
12
2 orientations each
Positions
4.3 × 10¹⁹
8! · 3⁷ · 12! · 2¹¹ / 2
Worst case
20 moves
Proved exhaustively in 2010
That position count is not a guess. There are 8! ways to arrange the corners and 3⁷ ways to twist them — the eighth corner’s twist is forced by the other seven. There are 12! arrangements of the edges and 2¹¹ ways to flip them, again with the last one forced. Then everything is halved, because corner and edge permutations must share a parity. Multiply it out and you get 43,252,003,274,489,856,000.
Only one of those positions is solved. Roughly 81% of the rest sit exactly 18 moves away from it.
What each phase of the solution does
The solver labels the two halves of its answer, and they are doing genuinely different jobs. Watch the 3D cube while you step through and the split is visible.
| Phase 1 | Phase 2 | |
|---|---|---|
| Goal | Reach the subgroup G1 | Solve inside G1 |
| Moves allowed | All 18 | U, U2, U', D, D2, D', R2, L2, F2, B2 |
| What it fixes | Corner twist, edge flip, middle-slice edges | Everything else |
| Typical length | 7–11 moves | 9–13 moves |
| States to search | 2,217,093,120 | 19,508,428,800 |
| Table used | Twist × slice, flip × slice | Corner perm × slice, edge perm × slice |
Reading the solution
Each letter names a face as you are holding the cube: U up, D down, R right, L left, F front, B back. A bare letter is a quarter turn clockwise looking at that face. An apostrophe means anticlockwise. A 2 means a half turn, and the direction does not matter.
The single most common mistake is turning D the wrong way, because you are looking at it from the top. Rotate the cube to look directly at the face before you turn it until the habit sticks. Full detail on the notation page.
If you would rather learn than be told
A solver hands you 20 moves you will not understand. The beginner’s method takes about 100 moves and eight algorithms, but after an hour you can solve any cube from any state without help — and the eight algorithms carry straight over into speedcubing.
Common questions
- How many moves does the 3x3 solver need?
- Between 18 and 21 for almost every scramble, with 20 or fewer for the overwhelming majority. The proven worst case for any cube is 20 face turns, and a two-phase search lands on or within a move of that essentially every time.
- What makes a 3x3 harder to solve than a 2x2?
- Edges. A 2x2 has eight corners and 3.67 million positions, small enough to store the exact distance from every single one to solved. A 3x3 adds twelve edges and nearly twelve trillion times as many positions — 43,252,003,274,489,856,000 — so no table can hold them all and the solver has to search instead.
- Do the centres matter when I enter my cube?
- They are the most important squares on the net. Centres are attached to the core and never move relative to each other, so they define which face is which. The solver fixes them for you: whatever colour scheme your cube uses, set white on top and green in front and copy the rest around them.
- Can I use the 3x3 solver from a phone?
- Yes. The net scrolls sideways inside its own box on narrow screens rather than pushing the page around, the 3D cube responds to touch drags, and the whole engine runs on-device — so it works on aeroplane mode too.
- Why does the solver split the answer into two phases?
- Because a single search over 43 quintillion states is hopeless, but two searches over a few billion each are not. Phase one only has to fix corner twist, edge flip and the middle-slice edges: 2.2 billion possibilities. Phase two then works inside a subgroup of 19.5 billion positions using only ten moves. Both fit in tables a browser can build in a fifth of a second.
Keep going
- Rubik's cube solverThe same tool on the home page, with the full explanation of the method.
- Rubik's cube 3×3 solutionA printable one-page solution sheet with every algorithm.
- 2×2 Rubik's cube solverProvably optimal answers — the 2×2 is small enough to solve exactly.
- 4×4 Rubik's cube solverReduction, with both parity cases detected and named for you.
- Rubik's cube algorithmsOLL, PLL and the beginner set, every one machine-verified.
- Speedcubing timerInspection, Ao5 and Ao12, session kept on your device.