It is a word you hear constantly — the algorithm decided this, the algorithm changed that, the algorithm is to blame. Spoken about so often, and so vaguely, it can start to sound like a mysterious force pulling strings behind the screen. The reality is far less mystical and much more useful to understand. At heart, an algorithm is simply a set of instructions, and you follow them every day.

What it is

An algorithm is a precise, step-by-step set of instructions for solving a problem or completing a task. Given a starting point and a goal, it lays out exactly what to do, and in what order, to get from one to the other. That is the whole idea. The word can feel intimidating, but the concept is something every one of us uses without thinking.

Crucially, algorithms are not unique to computers. A cooking recipe is an algorithm: a list of steps that, followed in order, turns ingredients into a meal. So are the directions to a friend's house, the instructions for assembling flat-pack furniture, or the method you were taught for long division at school. Each is a defined sequence of steps designed to reach a reliable result.

What sets computer algorithms apart is not the concept but the scale and speed. A computer can follow an algorithm millions of times a second, flawlessly and without tiring. That ability to apply clear instructions at enormous scale is what makes algorithms so powerful — and so central to modern life.

What makes a good algorithm

For a set of instructions to work as an algorithm, it needs a few qualities:

  • Clear and unambiguous. Each step must be defined precisely, leaving no room for guessing. A computer cannot interpret "season to taste".
  • Ordered. The steps must run in a logical sequence, because order changes the outcome.
  • Finite. It must eventually finish, reaching a result rather than running forever.
  • Effective. Each step must be something that can actually be carried out.

A simple example makes it concrete. Suppose you want to find the largest number in a list:

  1. Look at the first number and remember it as the largest so far.
  2. Move to the next number.
  3. If it is bigger than the one you are remembering, remember this one instead.
  4. Repeat until you reach the end of the list.
  5. The number you are left remembering is the largest.

That is a complete algorithm. It is clear, ordered, finite and effective, and a computer can run it on a list of three numbers or three billion.

Algorithms versus programs

People sometimes use "algorithm" and "program" as if they mean the same thing, but there is a useful distinction. An algorithm is the method — the logical recipe for solving a problem, independent of any particular computer language. A program is that algorithm written out in code so a machine can actually run it.

Think of it like music. The algorithm is the composition — the idea, written as a score. The program is a specific performance of that piece by a particular orchestra. One algorithm can be turned into programs in many different languages, just as one score can be performed countless ways.

This is why programmers spend so much time thinking before they type. Getting the algorithm right — the underlying logic — matters more than the code that expresses it. A clever, efficient algorithm can be the difference between a task taking a second and taking a week.

Where you meet algorithms every day

Once you start looking, algorithms are everywhere in the technology you use. A few examples show their reach:

  • Search results. A search engine uses ranking algorithms to decide which pages to show you first, sifting billions of options in an instant.
  • Recommendations. The "you might also like" suggestions on streaming and shopping services come from algorithms that spot patterns in what people watch or buy.
  • Social media feeds. Algorithms decide the order of posts you see, choosing what to show based on what is likely to keep you engaged.
  • Maps and navigation. Route-finding algorithms calculate the fastest way from A to B, weighing distance, traffic and roadworks.
  • Online payments and banking. Algorithms check transactions for signs of fraud in real time, part of the wider world of cybersecurity.
  • Sorting and filtering. Whenever you order emails by date or filter products by price, algorithms are quietly doing the work.

To do their job, many of these algorithms rely on information about you and your behaviour — a reminder that metadata and other data are the raw material algorithms feed on.

When algorithms get it wrong

Because algorithms increasingly make decisions that affect people, it is worth understanding their limits. An algorithm follows its instructions exactly — which is a strength when the instructions are good and a serious weakness when they are not.

The phrase computer scientists use is "garbage in, garbage out". If the logic behind an algorithm contains flawed assumptions, or the data it learns from reflects existing unfairness, the results can be unfair too, even though the machine is "only following instructions". An algorithm used to filter job applications, approve loans or flag content can quietly carry the biases baked into its design or its data.

This is why transparency matters, particularly for algorithms that influence important decisions. In the UK, data protection rules overseen by the Information Commissioner's Office give people certain rights around automated decision-making, including, in some cases, the right to ask for a human to be involved. The lesson is not that algorithms are sinister, but that they are tools — and like any tool, their fairness depends on the people who build and use them.

The bottom line

An algorithm is a clear, step-by-step set of instructions for solving a problem or completing a task — no more mysterious, in essence, than a recipe or a set of directions. What makes computer algorithms remarkable is the speed and scale at which machines can follow them, which is why they now shape so much of what we search, watch, buy and see. They are immensely useful, but they are only ever as good and as fair as the logic and data behind them. Understanding what an algorithm really is takes the mystery out of the word and helps you think more clearly about the many decisions technology now makes on your behalf.