Difference between formula and algorithm

An algorithm is in its most general definition: a way of achieving a desired goal. Formula are merely recipes or components.

Example: The actual method of baking bread with steps is an algorithm:

  1. get ingredients
  2. mix ingredients
  3. put in oven
  4. cook until certain time at certain temperature
  5. take out and wait till cools

in here would be formula such as the formula for the bread, what ingredients etc...

The quadratic formula is just that: a formula for solving quadratic equations

An example of an algorithm for solving quadratics would be:

  1. get quadratic: call a the coefficient in front of x^2, b the coefficient in front of x and c the constant coefficient.

  2. evaluate quadratic formula (both + and - versions) on given a, b and c

  3. simplify

This algorithm solves the actual problem... whereas the formula is a tool used in the process.


An algorithm is a method for solving a problem, but a formula is a sequence of numbers and symbols corresponding to a word in a language. The quadratic formula is an algorithm, because it is a method for solving quadratic equations. Algorithms may not even involve math, but formulas almost exclusively use numbers.