Rubik’s cube algorithms
An algorithm is just a short list of turns that does one useful job, like moving a corner into place without messing up the rest. Here are the ones beginners need, then the full sets faster solvers learn.
First, the letters
Each letter is a face: Up (top), Down (bottom), Right, Left, Front and Back. A letter on its own means turn that face a quarter turn clockwise, as if you were looking straight at it. A dash (’) means anticlockwise and a 2 means half a turn. So R U R' U' means: right clockwise, top clockwise, right anticlockwise, top anticlockwise. There is much more on the notation page.
Beginner’s method algorithms
These seven are all you need to solve the whole cube with the beginner’s method. In this method you hold the cube with white on the bottom and yellow on top.
| What it does | Moves | When to use it |
|---|---|---|
| Corner insert (white corners) | R U R' U' | Repeat until a white corner drops into place, white facing down. |
| Middle edge to the right | U R U' R' U' F' U F | Moves a top edge down into the front-right slot. |
| Middle edge to the left | U' L' U L U F U' F' | Moves a top edge down into the front-left slot. |
| Yellow cross | F R U R' U' F' | Dot to L shape, L shape to line, line to cross. |
| Yellow edges (Sune) | R U R' U R U2 R' | Cycles three top edges. Follow with U to finish. |
| Position yellow corners | U R U' L' U R' U' L | Cycles three corners and keeps the front-right top corner where it is. |
| Orient yellow corners | R' D' R D | Repeat 2 or 4 times on each twisted corner, turning only the top in between. |
R U R’ U’ is the most used move pattern in cubing. Do it six times and the cube comes back to where it started.
Algorithms for faster solving (CFOP)
Most speedcubers use a method called CFOP: Cross, First two layers, Orient the last layer, Permute the last layer. It needs more algorithms, but each step is quicker. You don’t have to learn them all at once. Many people learn the two-look versions first (about 10 algorithms) and add more over time.
- F2L: first two layersAll 41 cases for pairing a corner with its edge and slotting them in together.
- OLL: orient the last layerAll 57 cases for making the whole top face yellow in one go.
- PLL: permute the last layerAll 21 cases for moving the last-layer pieces into place.
Tips for learning algorithms
- Learn them in chunks. Many algorithms are built from short groups like R U R' U' (often called the “sexy move”) or R' F R F' (the “sledgehammer”). Spot the groups and long algorithms get much easier.
- Use your hands, not your eyes. After a few goes, let your fingers remember the moves. Doing them slowly and smoothly beats rushing.
- Watch them in 3D. Press Play on any demo on this site, or type the moves into the 3D cube with your keyboard.
- Check the picture. Every diagram on these pages is drawn by applying the algorithm backwards to a solved cube, so the picture always matches the moves.
Questions people ask
How many algorithms do I need to solve a Rubik’s cube?
With the beginner’s method, about seven short ones. Full CFOP uses 41 F2L cases (usually solved by thinking rather than memorising), 57 OLL and 21 PLL algorithms.
What is the easiest algorithm?
R U R’ U’. It is used in the beginner’s method for the white corners and appears inside many other algorithms.
What does the apostrophe mean in R’?
It means turn that face anticlockwise. It is said “R prime”.