What Is an Algorithm? Explained for Kids

A recipe tells you how to bake a cake. Directions tell you how to get to school. Both are lists of steps that get a job done. A list like that has a name: an algorithm.

An algorithm is a list of steps

An algorithm is a list of clear steps that tells you how to do a job or solve a problem. You follow the steps in order, and when you reach the end, the job is done.

What Is an Algorithm? A visual guide for kids ages 8–12: An algorithm is a list of steps; The steps must be clear and in order; Some algorithms are faster; Algorithms are everywhere.

Computers use algorithms all the time. A program is an algorithm written in a language that a computer can follow.

The steps must be clear and in order

A computer does exactly what the steps say. It cannot guess what you meant. So a good algorithm has three things:

  • Every step is clear.
  • The steps are in the right order.
  • The steps come to an end.

“Make breakfast” is not an algorithm. “Take a slice of bread, put it in the toaster, push the lever down” is the start of one.

Some algorithms are faster

Two algorithms can do the same job in different ways. Imagine a friend picks a secret number from 1 to 100 and tells you “higher” or “lower” after each guess.

  1. You could guess 1, then 2, then 3. That might take 100 guesses.
  2. You could guess the middle number, then the middle of what is left. That takes 7 guesses at most.

Both plans find the number. The second one gets there in far fewer steps.

Algorithms you meet every day

A map app uses an algorithm to find a route. A search engine uses algorithms to decide which results to show first. A video app uses them to suggest what to watch next.

Did you know?

The word “algorithm” comes from the name of al-Khwarizmi, a mathematician who lived about 1,200 years ago. People used algorithms long before computers existed.

Questions to talk about

  • What is an algorithm you follow every morning?
  • What could go wrong if two steps were swapped?
  • Why does a video app suggest some videos and not others?