A Rubik's Cube algorithm is a fixed sequence of moves that changes a few specific pieces and leaves everything else where it was. A beginner needs about 7 algorithms to solve the cube. The faster "2-look" CFOP method uses 16. Full CFOP, which most speedcubers use, has 119: 41 for F2L, 57 for OLL and 21 for PLL.
This page covers all of them in the order you'd learn them. Every algorithm with a demo can be played on an animated cube, and every one has been checked move by move by our cube engine.
How to Read an Algorithm
Each letter is a face: R right, L left, U up (top), D down (bottom), F front and B back. A letter on its own is a clockwise quarter turn, as you look at that face. An apostrophe (R') means counterclockwise, and a 2 (U2) means a half turn. Lowercase letters like r turn two layers at once, and M is the middle slice. Hold the cube still and do the moves in order. The demos on this page all use yellow on top and green in front, as in our beginner guide. More detail is in the notation guide.
The 7 Beginner Algorithms
These are all you need to solve the cube with the layer-by-layer method. Each one links to its animated demo in the step-by-step guide.
| Algorithm | Used for | What it does |
|---|---|---|
| R U R' U' | Step 3: white corners | Repeat 1, 3 or 5 times to drop a white corner into its slot. Watch it |
| U R U' R' U' F' U F | Step 4: middle layer | Places a top edge into the middle layer on the right. Watch it |
| U' L' U L U F U' F' | Step 4: middle layer | The mirror image: places an edge on the left. Watch it |
| F R U R' U' F' | Step 5: yellow cross | Turns a line into a cross (an L needs it twice). Watch it |
| R U R' U R U2 R' U | Step 6: yellow edges | Cycles the top edges so they match their side centers. Watch it |
| U R U' L' U R' U' L | Step 7: corner spots | Cycles three corners while the front-right one stays put. Watch it |
| R' D' R D | Step 7: corner twists | Repeat 2 or 4 times to twist a corner until yellow faces up. Watch it |
Your Learning Path: How Many Algorithms Do You Need?
Most people move through three stages. The times are rough guides from the cubing community, not promises. Practice matters more than the number of algorithms you know.
| Stage | Algorithms | Typical times | What changes |
|---|---|---|---|
| Beginner (layer by layer) | 7 | 1–3 minutes | You can solve it from memory. |
| 2-look CFOP | 16 (10 OLL + 6 PLL) plus intuitive F2L | 30–60 seconds | You solve the first two layers together and finish the last layer in four short steps. |
| Full CFOP | 119 (41 F2L + 57 OLL + 21 PLL) | Under 20 seconds | Every last-layer case has its own algorithm, so it's done in two steps. |
A good order is: learn the beginner method, then 2-look OLL and 2-look PLL, then practice F2L until it's smooth. After that, learn full PLL (21 cases, including the T, Y, U, H and Z perms you already know from 2-look), and finally full OLL.
CFOP Algorithm Sets
CFOP stands for Cross, F2L, OLL, PLL, the four stages of the method. The cross is done intuitively, just like steps 1 and 2 of the beginner method but straight on the bottom. Each of the other three has its own algorithm set.
F2L algorithms (41 cases)
F2L (First Two Layers) replaces beginner steps 3 and 4. Instead of placing a corner and then an edge, you join each white corner with its middle-layer edge in the top layer and insert them as a pair. There are 41 basic cases. Most cubers learn them intuitively first, since the simplest ones are just three moves.
R U R'
A white corner and its edge are already paired in the top layer, above their slot.
See all cases on the F2L algorithms page.
2-look OLL (10 algorithms)
OLL (Orientation of the Last Layer) makes the whole top face yellow. The 2-look version splits that into two steps: first a yellow cross (3 cases, which you already know from the beginner method), then the corners (7 cases). That's 10 algorithms in total.
F R U R' U' F'
A horizontal yellow line.
More on the 2-look OLL page.
2-look PLL (6 algorithms)
PLL (Permutation of the Last Layer) moves the yellow pieces to their correct spots once the top is all yellow. The 2-look version does the corners first (2 cases), then the edges (4 cases). J Perm's 2-look set, for example, uses the T perm to swap two neighboring corners.
R U R' U' R' F R2 U' R' U' R U R' F'
Top is all yellow. The two right corners are swapped, and so are the left and right edges.
More on the 2-look PLL page.
OLL algorithms (57 cases)
Full OLL solves the whole top face in one algorithm, whatever the pattern. The best-known case is OLL 27, the Sune: a yellow cross with one corner's yellow facing up. You've already met it as the start of the beginner step-6 algorithm.
R U R' U R U2 R'
Yellow cross, with one corner's yellow facing up (the fish shape).
All 57 cases are on the OLL algorithms page.
PLL algorithms (21 cases)
Full PLL finishes the cube in one algorithm. The 21 cases have letter names based on how the pieces move. The U perm, for example, cycles three edges and leaves the corners alone.
R U' R U R U R U' R' U' R2
Corners are solved. Three edges need to cycle.
All 21 cases are on the PLL algorithms page.
Algorithms for Other Puzzles
- 2x2 cube: a 2x2 is just the corners of a 3x3, so the beginner corner algorithms work on it directly (see how to solve a 2x2). Faster methods (Ortega and CLL) use their own small sets. See 2x2 algorithms.
- 4x4 cube: you solve it by turning it into a giant 3x3, then using 3x3 algorithms. Two extra "parity" algorithms fix cases a 3x3 can never have, like a single flipped edge. See 4x4 parity algorithms, or let the 4x4 solver work out every move. The full method is in how to solve a 4x4.
- Pyraminx: it only needs a handful of short algorithms, and many solves are mostly intuitive. See Pyraminx algorithms.
How to Memorize Algorithms Faster
- Learn the triggers. Many algorithms are built from a few short pieces. Two of the best known are R U R' U' (the "sexy move") and R' F R F' (the "sledgehammer"). In the OLL algorithms on this site, the sexy move appears in 15 of 57 and the sledgehammer in 8. Once your hands know these, longer algorithms are just a few chunks.
- Use muscle memory, not letters. Read the algorithm a few times, then drill it until your hands do it without thinking. Saying it aloud in chunks ("sexy, sexy, sledge") helps.
- Learn a few at a time. Two or three new algorithms a day, practiced in real solves, stick much better than ten from a list.
- Recognize before you memorize. An algorithm is useless if you can't spot its case. Learn what each case looks like from the top and from the sides.
- Time your solves with a cube timer, so you can see which new algorithms actually make you faster.
FAQ
What's the most famous Rubik's Cube algorithm?
Probably the Sune (R U R' U R U2 R') or the sexy move (R U R' U'). Both show up in beginner methods and in speedcubing.
How many algorithms does the 3x3 have?
As many as you like, since any move sequence is technically an algorithm. In practice, the standard CFOP sets contain 119, and a beginner needs about 7.
Do I need algorithms to solve the cube?
Not strictly. The first steps of every method are intuitive. But solving the last layer without algorithms is very hard, so even beginners learn a few.
Is there an algorithm that solves any cube?
No single sequence solves every scramble, because each position needs its own route. You can enter your cube's colors in the Rubik's Cube solver to get a solution for your exact position.