Idle game math, the easy way
Why costs in clicker games always outrun income, what multipliers are for and when to hit “Prestige”. Our plain-words take on Kongregate’s series, with charts you can play with and a tiny game.

We’re making My Army Getting Stronger, an auto-battler where your army grows on its own. To make that growth fun, we sat down with the math behind idle games.
The best writing on it is Anthony Pecorella’s three-part series “The Math of Idle Games” on Kongregate, based on his GDC Europe 2016 talk. It’s thorough and full of formulas. This is not a translation. It’s how we understood the series, retold in plain words with our own examples, charts you can play with and a tiny game. For the exact formulas and the full argument, read the original. We link to it in every part.
Three parts:
- Cost and income: why players always hit a wall, and how to push it back.
- Generators of generators: a different way to grow.
- Prestige: what to base the reward on, and when to reset.
Five words you’ll need
- Currency is the number that goes up. Usually money; in our examples, gold.
- A generator makes currency: a lemonade stand, a farm, a duck with a bow. Its strength is how much it makes per second.
- Intermediate currency. Sometimes a generator doesn’t make money but something that turns into money later. In Clicker Heroes, heroes deal damage, damage kills monsters, and monsters drop gold. That lets the designer change the “exchange rate” as the game goes on.
- A multiplier is an upgrade that multiplies income. You buy it or get it for owning, say, 25 of the same generator.
- Prestige is the “start over, but stronger” button. You lose almost everything and get a special currency that speeds up the next run.
Part 1. Cost outruns income
Based on The Math of Idle Games, Part I.
Two rules of the genre
Take the lemonade stand from AdVenture Capitalist (Pecorella’s own example). The first stand costs 4 and earns 1.67 per second. Then two rules apply:
- Each next stand costs 7% more than the last one.
- Each stand adds the same amount to income.
🪙 Price of the next stand
💰 Income from all stands per second
At first you don’t notice. With 10 stands, the 11th costs under 8 while you earn almost 17 per second. A purchase costs less than a second of income, so you buy without thinking.
But cost multiplies every time and income only adds. Cost runs away, and every purchase takes longer to save for. Drag the “Already bought” slider and watch the “Time to save up” card.
The seesaw: cost vs income
🪙 Each next duck costs 7% more than the last💰 Each duck earns 1.67 per second
The steps on the blue line are ×2 multipliers at 25, 50 and 100 of the same unit. Each time cost almost catches up, a multiplier kicks income back up. Turn the multipliers off: by the hundredth purchase the lines part for good.
The chart is squeezed vertically: each grid line is a thousand times higher than the one below. On a normal scale, cost looks like a wall. Switch the scale and see.
The wall always comes
Anything that multiplies eventually beats anything that adds. Even if cost grows only 2% per step and income grows fast. The sliders only move the moment of overtaking.
Multiplying always catches up
For a designer that’s good news: the player is guaranteed to hit a wall. Your job is to put it in the right place. Too close, and players get bored. Too far, and the game ends before they want to come back.
The newest generator shouldn’t erase the old ones
With many generators, the best buy is the one with the most income per coin. A computer can check that at every step. People don’t play like that: they buy in batches of 10 or 100 and look at the big numbers.
An example. Lemonade earns 10 per second and costs 5. A car wash earns 10,000 per second and costs 7,500. Lemonade is the better deal: 2 income per coin against 1.33. But nobody notices +10 next to ten thousand. So the newest generator always wins, and the old ones become furniture. Nothing to choose, nothing to do.
The fix: give different generators different multipliers. Then sometimes archers are the better deal, sometimes recruits about to hit their ×2. The order of purchases stops being obvious, and the player gets a real choice.
Try it in the tiny game below. Our duck numbers are made up for the demo. The “best deal” tag shows the duck that gives the most income per gold right now. Under the list you can see what a purchase costs.
Tiny duck army
For programmers: how to price the ×10 and “Max” buttons without a loop
Notation: b is the price of the first unit, r the cost growth (1.07), k how many you own, c how much money you have.
The price of n units at once:
const bulkCost = (b, r, k, n) => b * r ** k * (r ** n - 1) / (r - 1);How many units you can afford:
const maxBuy = (b, r, k, c) =>
Math.floor(Math.log(c * (r - 1) / (b * r ** k) + 1) / Math.log(r));These work while the price grows by the same percentage. If the rule changes, say after the hundredth purchase, compute it in pieces. The derivation is in Part I.
Part 2. Generators that make generators
Based on The Math of Idle Games, Part II.
There’s another model. A tier-1 generator makes money. A tier-2 generator makes tier-1 generators. Tier 3 makes tier 2. Derivative Clicker and Shark Game work this way: in Shark Game, nurse sharks make sharks, and sharks catch fish.
With one tier, money grows steadily, like a ruler. With two, it snowballs: there are more generators every second. Each new tier makes the curve steeper.
Ducks that make ducks
One unit on the top tier. Every second, each unit makes one unit of the tier below, and the bottom tier makes gold.
Run six tiers and watch the bottom numbers explode. It’s like several AdVenture Capitalists working for each other.
The dashed line is growth with infinitely many tiers, a true exponential. Each new tier brings the curve closer to it but never catches up, because a game always has a finite number of tiers. So a cost that multiplies every time still wins. The seesaw works here too.
The model has a problem: why buy low tiers by hand when billions are made for free? Derivative Clicker solves it with two tricks:
- Price depends only on units you bought. Free generators don’t make the next purchase pricier.
- Each bought unit boosts its whole tier by 0.05%. Buying by hand is worth it even with a billion free ones.
Part 3. Prestige
Based on The Math of Idle Games, Part III.
Why reset progress
Prestige does two jobs:
- A feeling of power. After a reset, the player flies through the start many times faster. Launch games like Burrito Bison work the same way: fly, upgrade, launch again, fly further.
- Usable numbers. Without resets, numbers run off to infinity and it’s hard to hang progress on them. Prestige grows slower than earnings: earn 100 times more and you get 10 times more prestige. Upgrades are easy to tie to numbers like that.
What prestige is based on
Games count prestige differently:
- peak money: Realm Grinder;
- everything earned in the whole game: Cookie Clicker, AdVenture Capitalist;
- earnings in the current run: Egg, Inc.;
- purchases in the current run: Clicker Heroes.
The first two are cumulative. Reset at the same point as last time and you get less, or nothing. To grow, you have to go further each time. The last two are independent: each run counts from zero, and the same run gives the same reward.
How much prestige different games give
The key number is how much more you must earn to get twice the prestige. In AdVenture Capitalist and Realm Grinder it’s 4 times, in Cookie Clicker 8, in Egg, Inc. 128.
Egg, Inc. has the flattest curve: staying in one run for long doesn’t pay, so the game nudges you to reset often and play actively. On top of that, offline income there is capped at two hours. In Clicker Heroes prestige depends on the number of purchases, and purchase prices multiply, so prestige there grows slowest of all.
When to hit the button
Reset too early and you get few feathers. Reset too late and you sit at the wall while income barely grows. The best moment is somewhere in between. Find it with the slider. This simulation is ours; the numbers in it are picked for the demo.
When to hit “Prestige”
🔄 Reset→🪶 feathers for everything you earned→each feather +2% income, forever
A simulation of 4 hours of play. The player always buys as many ducks as they can afford and resets every N minutes.
Total after 4 hours, depending on how often you reset:
Look at the top chart. Within a run, income grows in jumps: the multipliers at 25, 50 and 100 ducks kick in. And the runs themselves get shorter and taller. That uneven staircase is what you want to design: when every run is the same, the game feels like a conveyor belt.
Real players rarely reset at the best moment. Five ducks away from a multiplier, people wait, whatever the math says. So a simulation helps you feel the balance but doesn’t predict it exactly.
What to take away
- Cost multiplies, income adds. The wall always comes; you choose where.
- Multipliers kick income up at the right moment. Different multipliers on different generators give the player a choice.
- Generators of generators look exponential but are slower. Cost still wins.
- The prestige formula sets the pace: ×4, ×8 or ×128 earnings to double prestige.
- Spreadsheets and simulations help, but balance is found only by iterating and playing your own game.
- Big numbers alone don’t impress players anymore. Find what’s fun in your game: new mechanics, achievements, hunting for the best moment to prestige. And invest in that.
We’re putting all of this into My Army Getting Stronger. We’ll tell you what worked.
Source. This is our own plain-words interpretation, not a translation, of Anthony Pecorella’s series for Kongregate, based on his GDC Europe 2016 talk. The originals, with all the formulas and spreadsheets: Part I, Part II, Part III. The game examples come from the series; the duck game, the charts and the prestige simulation are ours.
