Skip to content
Mental Models

The No Free Lunch Theorem

No Shortcut That Works Everywhere

The No Free Lunch claim in plain words, where the phrase comes from, and the key terms — method, problem, average — you need before we prove anything. Assumes zero background.

11 min Updated Jul 10, 2026

There’s an old line among economists: “there’s no such thing as a free lunch.” It comes from 19th-century American saloons that offered a “free” lunch to anyone who bought a drink. The lunch was salty — herring, ham, crackers — so you drank more. You paid for the meal; it was just hidden in the price of the beer. The lesson stuck: whenever something looks free, look for where the cost is hiding.

The No Free Lunch theorem takes that folk wisdom and makes it exact for one specific thing: methods that solve problems. Its claim, in a sentence, is that no method comes with a free lunch — no way of searching, choosing, or predicting does better than the others for free, on every problem. Any gain you see on one kind of problem was paid for by a loss somewhere else.

Before you read — take a guess

Guess first: in the saloon, why was the 'free' lunch salty?

The claim, stated carefully

Let’s pin down three words, because the whole theorem lives in them. None of this needs maths — just clear definitions.

Tip:

Three words to get straight

  • A method (also: strategy, algorithm, rule, model) is any fixed recipe for tackling a problem — “always check the kitchen first,” “buy when the price drops,” “guess the most common answer.”
  • A problem is one specific situation the method faces — one particular place the keys are hidden, one particular market, one particular question.
  • The average is the method’s performance added up across a whole set of problems and divided by how many there are — its typical score, not its score on any single lucky case.

With those in hand, here’s the theorem in beginner form:

Info:

No Free Lunch, in one line

If you average a method’s performance over all possible problems, every method scores the same. So no method is better than any other in general — only better on particular kinds of problem.

Read that twice. It’s not saying methods never differ — of course “check the door first” beats “check the attic first” when the keys are by the door. It’s saying that once you tally up every possible hiding place and take the average, the differences wash out completely.

Fill in the theorem.

Pick the right option for each blank, then check.

Averaged over problems, every method performs ; a method can only be better on kinds of problem.

What’s being denied — and what isn’t

The theorem denies exactly one thing: a universal winner. It does not deny that some methods crush others on the problems that actually show up in your life. Keeping those two apart is the single most important habit in this whole course.

The theorem DENIESThe theorem ALLOWS
A method that’s best on every problemA method that’s best on your problem
A “free” edge that costs nothing elsewhereA “paid” edge you buy with knowledge of the problem
”This tool wins, full stop""This tool wins here, for these reasons”

Notice the shape: every “allowed” cell has a because attached. Real advantages are always local and always paid for. The theorem just forbids the free, unconditional, works-on-everything kind.

Which statement would the No Free Lunch theorem call FALSE?

Why “for free” is the load-bearing phrase

People often shorten the theorem to “all methods are equal.” That’s wrong, and the missing words are “for free.” Methods are emphatically not equal on the problems in front of you. What they can’t do is be better without paying — without that advantage being clawed back on the problems they’re bad at.

Think of it like a blanket that’s too small. Pull it up to cover your shoulders and your feet stick out; pull it down over your feet and your shoulders freeze. A method that’s tuned to be great at one kind of problem has to leave some other kind exposed. There’s no blanket big enough to cover everything at once — that would be the free lunch, and it doesn’t exist.

Warning:

The misreading to avoid from day one

“No free lunch” is not “every method is equally good.” It’s “no method is better for free.” A method can be far better on the problems you actually face — it just buys that with worse performance on the problems you don’t. We’ll spend a whole lesson on this trap; plant the flag now.

Sorting claims: free-lunch myth or fair game?

Let’s practise the distinction. Some claims quietly assume a universal winner (the myth the theorem kills); others make a modest, local, paid-for claim (perfectly allowed).

Sort each claim: does it assume a forbidden 'free lunch' (a universal winner), or is it a fair, local claim the theorem allows?

Place each item in the right group.

  • "There is one diet that is optimal for every human being."
  • "On already-sorted data, this check finishes in one pass."
  • "This is simply the best learning technique — for anyone, any subject."
  • "My favourite algorithm wins on every input, no exceptions."
  • "Spaced repetition beats cramming for memorising vocabulary."
  • "For this well-behaved, smooth landscape, hill-climbing finds the peak fast."

Where the idea comes from

You don’t need the history to use the model, but a little context makes it stick. The phrase entered computer science through David Wolpert and William Macready, who in 1997 proved a “No Free Lunch theorem for optimization” — roughly, that averaged over all possible objective functions, all search algorithms perform identically. Wolpert had shown a related result for machine learning a few years earlier. The maths is real and precise; the idea, happily, is something you can grasp with keys and blankets and a salty saloon lunch.

Match each term to its plain meaning.

Pick a term, then click its definition.

Recap

Big picture

No shortcut that works everywhere

  • No Free Lunch — the claim
    • Averaged over ALL problems
      • Every method ties
      • Differences wash out
    • Denies one thing
      • A universal winner
    • Allows
      • Local wins, paid for with knowledge
    • The load-bearing words
      • "for free" — not "equal"

So the claim is on the table: no method wins everywhere for free. That should feel suspicious — surely some clever method sneaks ahead? The next lesson makes the theorem impossible to dodge by letting you count it yourself, on a board small enough to check by hand.

Mark lesson as complete