Home › Algorithms

Rubik's Cube Algorithms: From Beginner to CFOP

Updated November 4, 2026

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.

AlgorithmUsed forWhat it does
R U R' U'Step 3: white cornersRepeat 1, 3 or 5 times to drop a white corner into its slot. Watch it
U R U' R' U' F' U FStep 4: middle layerPlaces a top edge into the middle layer on the right. Watch it
U' L' U L U F U' F'Step 4: middle layerThe mirror image: places an edge on the left. Watch it
F R U R' U' F'Step 5: yellow crossTurns a line into a cross (an L needs it twice). Watch it
R U R' U R U2 R' UStep 6: yellow edgesCycles the top edges so they match their side centers. Watch it
U R U' L' U R' U' LStep 7: corner spotsCycles three corners while the front-right one stays put. Watch it
R' D' R DStep 7: corner twistsRepeat 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.

StageAlgorithmsTypical timesWhat changes
Beginner (layer by layer)71–3 minutesYou can solve it from memory.
2-look CFOP16 (10 OLL + 6 PLL) plus intuitive F2L30–60 secondsYou solve the first two layers together and finish the last layer in four short steps.
Full CFOP119 (41 F2L + 57 OLL + 21 PLL)Under 20 secondsEvery 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.

    Rubik's Cube, step 5 start position, yellow on top: A horizontal yellow line.

    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

            How to Memorize Algorithms 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.