Kociemba two-phase algorithm

Any scramble, solved in about twenty moves.

A 3D Rubik's Cube solver that runs entirely in your browser and animates every move of the solution.

Two phases, one short path

  1. 1

    Reduce the cube. Phase one searches for a short sequence that brings every edge and corner orientation into a restricted subgroup.

  2. 2

    Finish inside it. Phase two solves the rest using only half turns and U or D quarter turns, where the remaining search space is tiny.

  3. 3

    Stay near optimal. Chained together, both phases land around twenty moves, close to God's number, without exhaustive search.

A real solve from this app
scramble
R D L2 D2 B2 D2 B F R2 L' B F2 D' L R U2 D' B2 F2 U F' D F2 B' U2
solution
F' U' R L' D' B' R2 F' R' B U' R2 B2 L2 U L2 U2 R2 B2 D L2 B2
length
22 moves

Watch the solution, or take the wheel

Move-by-move playback

Play, pause, step forward or back, and set the speed. The current move stays highlighted as the cube turns.

Manual mode

Turn any face clockwise or counterclockwise, then solve from the new state.

Nothing leaves your machine

The solver runs in a Web Worker. Pruning tables build once, locally, with no server round-trips.

True 3D, never out of sync

Drag to orbit, scroll to zoom. Every turn animates on the real cube state, so the picture can never drift from the math.

The numbers behind a Rubik's Cube solve

43,252,003,274,489,856,000

reachable positions of a 3×3×3 cube

20

God's number: the most moves any position ever needs

2

search phases in Kociemba's algorithm

Questions, answered

Is this Rubik's Cube solver free?
Yes. There is no account, no paywall, and no usage limit. Open the solver and use it.
Does my cube data get sent to a server?
No. The solver runs in a Web Worker in your browser. Scrambles, cube states, and solutions are computed on your own device, so nothing about your cube leaves it.
What is the Kociemba two-phase algorithm?
It solves a cube in two stages. Phase one finds a short sequence that brings the cube into a restricted subgroup where every remaining position can be reached with half turns plus U and D quarter turns. Phase two finishes inside that much smaller search space. Splitting the problem this way finds a near-optimal solution in milliseconds instead of searching the whole cube at once.
How many moves does a solution take?
Usually around twenty. That is close to God's number without the cost of an exhaustive optimal search.
What is God's number?
Twenty. It is the proven maximum: every one of the 43,252,003,274,489,856,000 reachable positions of a 3x3x3 cube can be solved in twenty moves or fewer, in the half-turn metric.
What do the letters in the solution mean?
They are standard cube notation. U, R, F, D, L and B are the up, right, front, down, left and back faces. A plain letter is a quarter turn clockwise, an apostrophe means counterclockwise, and a 2 means a half turn. So R' is the right face turned counterclockwise and U2 is the up face turned twice.
Can it solve any scramble?
Any position reachable by turning a standard 3x3x3 cube, yes. Physically impossible states, such as a single flipped edge or a cube with mismatched stickers, cannot be solved and are not reachable through the app.
Can I enter the state of my own physical cube?
Not yet. The app scrambles a cube for you, and manual mode lets you turn any face yourself to reach a specific position. Solving from a scanned or hand-entered state is not currently supported.

Your scramble is waiting.

Solve a cube