Older than computers
The word algorithm comes from the name of Muhammad ibn Musa al-Khwarizmi, a ninth-century scholar in Baghdad whose writings introduced Hindu–Arabic numerals and systematic methods of calculation to a wide audience; the word 'algebra' derives from one of his book titles. The idea is ancient. Euclid described a method for finding the greatest common divisor of two numbers more than two thousand years ago, and it is still taught and used. A cooking recipe, long division and the steps for changing a tyre are all algorithm-like. What computing adds is strictness: every step must be precise enough for a machine with no common sense.
What makes an algorithm
Computer scientists generally require an algorithm to have clearly defined inputs and outputs, steps that are unambiguous and can actually be carried out, and a guarantee that it finishes. 'Add a pinch of salt' fails the test; 'add two grams of salt' passes. An algorithm is different from a program: the algorithm is the method, while the program is one way of writing it down in a particular language. The same sorting method could be written in dozens of languages and run on any computer. This separation lets researchers study methods mathematically, independent of fashionable hardware. Methods tend to outlast machines.
Same task, different speeds
Imagine finding a name in a phone book of a million entries. Checking every name in turn could take a million steps. Because the list is sorted, you could instead open it at the middle, see whether the name comes before or after, discard the wrong half and repeat. This method, binary search, needs only about 20 steps. Computer scientists describe such differences with 'big O' notation, which captures how work grows with input size. A linear method grows in step with the data; binary search grows logarithmically. For huge datasets, choosing the right method matters far more than buying faster hardware.
Some problems are hard
Some problems seem to resist efficient methods altogether. Finding the shortest route that visits each of many cities exactly once, known as the travelling salesperson problem, has no known method that is guaranteed both to find the perfect answer and to stay fast as the number of cities grows. Whether such problems can ever be solved efficiently is one of the great open questions of mathematics. In practice, delivery companies and airlines use approximation methods that find very good, if not perfect, answers quickly. The difficulty of certain problems is also useful: modern encryption relies on calculations that are easy one way and impractical to reverse.
Algorithms all around
Algorithms decide the route a navigation app suggests, the order of posts in a social feed, how a streaming service compresses video and how a bank flags unusual card spending. Many now involve machine learning, where the algorithm learns patterns from data rather than following rules written entirely by a person. That makes their behaviour harder to explain. Public debate about 'the algorithm' usually concerns these ranking and recommendation systems, which embody choices about what to optimise, such as engagement or relevance. Those choices are made by people, even when the calculations are automated, which is why regulators increasingly ask for transparency.
Common misconceptions
An algorithm is not inherently neutral or objective. If it is built on biased data or optimises the wrong goal, it can produce unfair outcomes consistently and at scale. Nor is an algorithm necessarily complicated: many of the most important are short enough to describe in a paragraph. And faster computers do not make algorithm design obsolete. As data volumes grow, efficient methods matter more, not less. For anyone learning to code, practising how to break a problem into clear, ordered steps is the essential skill; the programming language is secondary. That habit of precise thinking is useful well beyond computers.
Sources & further reading
Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.



