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?

Questions parents ask

Is an algorithm the same as a computer program?

Not quite. An algorithm is the plan: the list of steps. A program is that plan written in a language a computer can follow. You can write an algorithm on paper, in plain words, without any computer at all.

Do algorithms decide what I see online?

Often, yes. Video apps, games and social media use algorithms to choose what to show next, based on what you watched, clicked or liked before. Knowing that helps kids remember that the next video is a suggestion, not a must.

Who writes algorithms?

People do. Programmers, engineers and scientists design algorithms for everything from map routes to weather forecasts. Kids write them too, every time they give clear step-by-step directions, plan a game or put the steps of a task in order.

How can kids practice algorithms without a computer?

Try writing the steps for a simple job, like brushing teeth, and have someone follow them exactly as written. Any missing or unclear step shows up right away. Board games, recipes and treasure-hunt clues are good practice too.