Exponential cost scaling
Each purchase multiplies the next price by a fixed factor; prices grow geometrically, income usually linearly.
Facts
- Games
- 5 · 2013–2017
- Evidence
- Verified (23)
Code (16)
Dev blog (5)
Developer (3) - Sources
- 12
On this page
In most incremental games, each purchase multiplies the next price by a fixed factor : after purchases the price is . Income grows linearly with the count owned, so purchases speed up, then slow down. sets when the turn comes and how steep it is. In 2016, Anthony Pecorella of Kongregate called exponential costs against linear or polynomial production the typical idle-game design, a seesaw between production and costs1.
- NoneA Dark Room (2013). Huts and traps rise by a fixed step of wood, up to a cap.2,3
- PolynomialUniversal Paperclips (2017). Drones, farms, and batteries cost a power of the count; AutoClippers, MegaClippers, and Marketing grow by a fixed ratio, and factories by a falling one.4,5,6,7,8
- Fixed ratioCookie Clicker (2013). ×1.15 per building owned, one constant for all buildings.9,10,11,12,13,14,15,16Kittens Game (2014). Each building its own ratio, 1.10 to 2.5, which upgrades lower toward 1 with diminishing returns.17,18,19,20,21
- Rising ratioAntimatter Dimensions (2016). Price flat for each set of 10, then ×10³…10¹⁵; super-exponential past Number.MAX_VALUE.22,23,24,25,26,27,28,29
#How it works
Let be the base price (the first one) and the growth constant. With owned, the next one costs
On a log axis, the price is a straight line: sets its height, and sets its slope. The price doubles every purchases: 4.96 at , 10.2 at 1.07, and 3.1 at 1.2530.
#Buying several at once
Buying more with owned sums a geometric series:
At , “buy 10” costs 20.30× the next single price31 whatever the count owned: . Inverting it gives the most you can buy with , 32.
#Why the growth constant sets the pace
Let each one owned earn per second, as each building type does in Cookie Clicker before upgrades33. With owned and nothing saved, the next one takes
The ratio is below 1 while , then above 1, tending to 34:
- Waits shrink until about : 6.7 at , 14.3 at 1.07, and 4 at 1.2534.
- Then each wait is about times the last, doubling every purchases like the price34,30.
For Cookie Clicker’s Grandma (base price 100 cookies12, 1 cookie/s35), the wait is 115 s for the 2nd, 38 s at its low for the 8th, and 36 minutes for the 51st36. In Pecorella’s account, multipliers keep production close until the wait “gets prohibitively long”, the point to prestige37.
With linear costs and income , the wait tends to and never runs away.
#Implementations
#Cookie Clicker
The web version (2.058) uses one constant for all 20 buildings: each one owned multiplies the next price by 1.159. The next price is 10. Free buildings (Starter kit, Starter kitchen) come off the exponent13. Discounts such as ×0.99 apply before the rounding, lowering the line but not its slope14.
var price=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,this.amount-this.free));Only the Cursor keeps its written base price of 1538. The rest come from a formula on the building’s index11: 100, 1,100, 12,000, 130,000, and so on12. A sibling formula sets base production35.
The store shows bulk prices (1, 10, or 10039) as the exact geometric sum, rounded up once31. The purchase buys one at a time, each rounded up, ignoring the total. Ten Grandmas from zero show 2,031 but cost 2,035, and one cookie short still buys nine40. Selling pays 25% of the next price, about 15% more than its label41.
#Antimatter Dimensions
In Antimatter Dimensions, each of the eight dimensions keeps one price for 10 purchases, then multiplies it by its tier’s factor24. Factors run from 10³ to 10¹⁵, about ×2.0 per purchase for tier 1 and ×32 for tier 823. Starting prices run from 10 to 10²⁴22.
Once a price passes Number.MAX_VALUE ≈ 1.8 × 10³⁰⁸26, the shared cost class grows the ratio between sets by another factor of 1027 each set. With sets past the threshold, the price is , quadratic in log space25. For the 1st Dimension, the extra scaling starts after 103 sets, or 1,030 bought26.
The same amount reaches Infinity, the first prestige reset42. The Break Infinity upgrade “Reduce post-infinity Antimatter Dimension cost multiplier scaling” lowers S to 328. Tickspeed upgrades use the same class at ×10 per purchase29.
“Buy until 10” is exact, because the price is flat within a set43. Max-buy charges only the most expensive set it buys, about 0.1% under the true sum44 at ×1,000 per set. A code comment says it “assumes you only have to pay for the most expensive thing”44. Over a long run, the true sum approaches times the last price: 1.001 at ×1,000 (Antimatter Dimensions) and 7.7 at ×1.15 (Cookie Clicker)45.
#AdVenture Capitalist
Pecorella gives the Lemonade Stand as 46 at 1.67 per second each. At , the shortest wait comes with 15 stands owned34. The game’s code isn’t public.
#Kittens Game
In Kittens Game, each building has its own ratio, where Cookie Clicker uses one for all18,9. Upgrades lower a ratio toward 1 but never to it20. Workshop upgrades bring the Hut’s ratio to 1.3516 × per Hut, with all four21.
#Universal Paperclips
Universal Paperclips prices its drones by a power of the count, not a ratio: with owned, the next costs clips4. Its factories multiply the price by a factor that falls with each one built, where Cookie Clicker’s stays fixed8,9.
#A Dark Room: linear, with a cap
A Dark Room prices huts at wood2 and traps at wood3. The build action refuses past the maximum, so the cap, not the price, ends each run47. Housing is 4 villagers per hut48.
#History
Cookie Clicker launched on 8 August 201349. Its earliest capture, five days later, set each new price to 15. The rounding compounded, so the 51st Cursor cost 2,283, not 15 × 1.1⁵⁰ ≈ 1,76115. By v1.035, captured 10 September 2013, the rule was through one constant16.
A Dark Room, announced two months before Cookie Clicker50, used linear prices. Antimatter Dimensions (201651) used steps of 10 and a super-exponential stage.
#Variants and combinations
- Stepped: Antimatter Dimensions.
- Super-exponential past a threshold: Antimatter Dimensions’ post-Infinity scaling.
- Linear with a cap: A Dark Room.
- Bulk buying: the exact sum (Cookie Clicker’s label) or only the last price (Antimatter Dimensions’ max-buy).
- Discounts: Cookie Clicker.
- Prestige: restarts the curve; production multipliers carry across37.
Games
| Game | Year | How | Note |
|---|---|---|---|
| Universal Paperclips | 2017 | Polynomial | drones, farms, and batteries cost a power of the count; AutoClippers, MegaClippers, and Marketing grow by a fixed ratio, and factories by a falling one |
| Cookie Clicker | 2013 | Fixed ratio | ×1.15 per building owned, one constant for all buildings |
| AdVenture Capitalist | 2014 | Fixed ratio | each business has its own fixed coefficient |
| Kittens Game | 2014 | Fixed ratio | each building its own ratio, 1.10 to 2.5, which upgrades lower toward 1 with diminishing returns |
| Antimatter Dimensions | 2016 | Rising ratio | price flat for each set of 10, then ×10³…10¹⁵; super-exponential past Number.MAX_VALUE |
Every claim about this mechanic, by game (58)
References
- ^Dev blogPecorella 2016
How we know
Pecorella calls idle games a seesaw between production and costs, typically with exponential costs () against linear or polynomial production.
This is typically accomplished by having costs grow exponentially while production grows at a linear or polynomial rate. … $cost_{next} = cost_{base} \times (rate_{growth})^{owned}$
· archived copy ↗ - ^ abVerifieddoublespeakgames/adarkroomroom.js 43–58
How we know
A hut costs wood, with already built, up to 20 huts (11,500 wood for all 20).
54 'wood': 100 + (n * 50)script/room.js lines 43–58 at 1fada46 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifieddoublespeakgames/adarkroomroom.js 13–28
How we know
A trap costs wood, and at most 10 can be built.
24 'wood': 10 + (n * 10)script/room.js lines 13–28 at 1fada46 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abCodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
Harvester and Wire Drones are priced by a power of the count, not a ratio: with owned, the next costs clips.
var harvesterCost = 1000000;
globals.js#L79-L80 · archived copy ↗ harvesterCost = Math.pow((harvesterLevel+1),2.25)*1000000;
main.js#L2460-L2468 · archived copy ↗ wireDroneCost = Math.pow((wireDroneLevel+1),2.25)*1000000;
main.js#L2491 · archived copy ↗ - ^CodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
The first AutoClipper costs $5; with owned, the next costs dollars. The flat 5 is most of the price until the 18th, when passes 5.
var clipperCost = 5;
globals.js#L10 · archived copy ↗ clipperCost = (Math.pow(1.1,clipmakerLevel)+5);
main.js#L2364-L2374 · archived copy ↗ - ^CodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
The first MegaClipper costs $500; with owned, the next costs dollars, so the second costs $1,070.
var megaClipperCost = 500;
globals.js#L54 · archived copy ↗ megaClipperCost = (Math.pow(1.07,megaClipperLevel)*1000);
main.js#L2377-L2387 · archived copy ↗ - ^CodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
Marketing starts at $100 and doubles with each level bought.
var adCost = 100;
globals.js#L16 · archived copy ↗ adCost = Math.floor(adCost * 2);
main.js#L3062-L3072 · archived copy ↗ - ^ abCodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
Clip factories start at 10⁸ clips, and each one built multiplies the next price by a factor that falls: ×10, ×9, … ×4 for the 1st–7th, ×2 for the 8th–12th, ×1.5 for the 13th–19th, ×1.25 for the 20th–38th, ×1.15 for the 39th–78th, and ×1.1 after.
var factoryCost = 100000000;
globals.js#L78 · archived copy ↗ fcmod = 11 - factoryLevel; … factoryCost = factoryCost * fcmod;
main.js#L2419-L2456 · archived copy ↗ - ^ abcdVerifiedCookie Clicker main.js v2.058 · Cookie Clicker Wiki, “Building”
How we know
One global constant, 1.15, multiplies a building's price for each one already owned.
Game.priceIncrease=1.15;
main.js#L7972 · archived copy ↗ Building Prices · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abcVerifiedCookie Clicker main.js v2.058 · Cookie Clicker Wiki, “Building”
How we know
A building's next price is , with discounts applied before rounding.
var price=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,this.amount-this.free));
main.js#L8090-L8095 · archived copy ↗ \text {Price} = \text {Base cost} \times 1.15 ^ {M-F}
Building Prices · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedCookie Clicker main.js v2.058
How we know
Every building after the Cursor gets its base price from one formula on its index : , rounded to two significant figures, then ×10 at id 16, ×100 at 17, ×1,000 at 18, and ×20,000 at 19.
this.basePrice=(this.n*1+9+(this.n<5?0:Math.pow(this.n-5,1.75)*5))*Math.pow(10,this.n)*(Math.max(1,this.n-14)); … if (this.id>=16) this.basePrice*=10; … if (this.id>=19) this.basePrice*=20;
main.js#L8024-L8031 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abcVerifiedCookie Clicker main.js v2.058 · Cookie Clicker Wiki, “Building”
How we know
Base prices (the first one's price) are Cursor 15, Grandma 100, Farm 1,100, Mine 12,000, Factory 130,000, Bank 1.4 million, and so on up to You at 5.4 × 10²⁶.
new Game.Object('Cursor'…{},15,function(me){
main.js#L8979 · archived copy ↗ this.basePrice=(this.n*1+9+(this.n<5?0:Math.pow(this.n-5,1.75)*5))*Math.pow(10,this.n)*(Math.max(1,this.n-14)); … var digits=Math.pow(10,(Math.ceil(Math.log(Math.ceil(this.basePrice))/Math.LN10)))/100; this.basePrice=Math.round(this.basePrice/digits)*digits; if (this.id>=16) this.basePrice*=10; if (this.id>=17) this.basePrice*=10; if (this.id>=18) this.basePrice*=10; if (this.id>=19) this.basePrice*=20;
main.js#L8024-L8031 · archived copy ↗ buildings table, “Base Cost” column · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedCookie Clicker main.js v2.058
How we know
Free buildings (Starter kit: 10 Cursors; Starter kitchen: 5 Grandmas) come off the exponent, so the next one costs the base price.
this.free+=amount;
main.js#L8266-L8275 · archived copy ↗ if (Game.Has('Starter kit')) Game.Objects['Cursor'].getFree(10);
main.js#L3828-L3829 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abCodeCookie Clicker main.js v2.058
How we know
Upgrades, auras, buffs, and gods multiply the price by factors that don't depend on the count, most of them discounts such as 0.99 or 0.95 and one a rise (the Nasty goblins buff, 1.02), so they scale the curve without changing its 1.15 slope.
if (Game.Has('Season savings')) price*=0.99; … if (Game.hasBuff('Nasty goblins')) price*=1.02; … price*=Game.eff('buildingCost');
main.js#L8792-L8814 · archived copy ↗ - ^ abcdVerifiedCookie Clicker, 13 Aug 2013 capture
How we know
The original (13 August 2013 capture) set each new price to , compounding the rounding: the 51st Cursor cost 2,283, not the unrounded 1,761.
this.price=Math.ceil(this.price*1.1);
index.html#L503-L512 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abCodeCookie Clicker main.js v1.035
How we know
By v1.035 (captured 10 September 2013), the price was via the same global constant, still unrounded.
Game.priceIncrease=1.15;
main.js#L1836 · archived copy ↗ var price=this.basePrice*Math.pow(Game.priceIncrease,this.amount);
main.js#L1871-L1876 · archived copy ↗ - ^Codenuclear-unicorn/kittensgamebuildings.js 350–358, 484–491, 792–799, 997–1004, 2589–2608; en.json 154–205
How we know
With none built and no cost reductions, a Catnip Field costs 10 catnip, a Hut 5 wood, a Barn 50 wood, and a Mine 100 wood.
350 name: "field", ⋮ 356 { name : "catnip", val: 10 }
js/buildings.js lines 350–358 at 781e379 · upstream ↗ 484 name: "hut", ⋮ 489 { name : "wood", val: 5 }
js/buildings.js lines 484–491 at 781e379 · upstream ↗ 792 name: "barn", ⋮ 797 { name : "wood", val: 50 }
js/buildings.js lines 792–799 at 781e379 · upstream ↗ - ^ abCodenuclear-unicorn/kittensgamebuildings.js 350–358, 484–491, 792–799, 997–1004
How we know
Each building carries its own price ratio: 1.12 for the Catnip Field, 2.5 for the Hut, 1.75 for the Barn, and 1.15 for the Mine.
358 priceRatio: 1.12,js/buildings.js lines 350–358 at 781e379 · upstream ↗ 491 priceRatio: 2.5,js/buildings.js lines 484–491 at 781e379 · upstream ↗ 799 priceRatio: 1.75,js/buildings.js lines 792–799 at 781e379 · upstream ↗ - ^Codenuclear-unicorn/kittensgamebuildings.js 2589–2612
How we know
Each of a building's prices is , with f a count the code adds to the number built, times the cost reductions in effect, with no rounding.
2608 var cost = bldPrices[i].val * Math.pow(ratio, bldVal + fakeBought) * priceModifier * resPriceModifier;js/buildings.js lines 2589–2612 at 781e379 · upstream ↗ - ^ abCodenuclear-unicorn/kittensgamebuildings.js 2568–2578; game.js 2726–2745
How we know
Upgrades lower a building's ratio toward 1 but never to it: reductions count in full up to 75% of , and past that each adds less, so their sum stays short of .
2576 ratioDiff = this.game.getLimitedDR(ratioDiff, ratioBase);js/buildings.js lines 2568–2578 at 781e379 · upstream ↗ 2729 var maxUndiminished = 0.75 * limit; //first 75% is free from diminishing returnsgame.js lines 2726–2745 at 781e379 · upstream ↗ - ^ abCodenuclear-unicorn/kittensgameworkshop.js 598–641; en.json 2384–2657; +1 files
How we know
Four workshop upgrades (Ironwood Huts, Concrete Huts, Unobtainium Huts, Eludium Huts) take 0.5, 0.3, 0.25, and 0.1 off the Hut's ratio of 2.5; their 1.15 runs past the 1.125 at which diminishing returns start (three quarters of the limit, 1.5), so the four bring it to about 1.35.
598 name: "ironwood", ⋮ 602 "hutPriceRatio" : -0.5 ⋮ 613 name: "concreteHuts", ⋮ 617 "hutPriceRatio" : -0.30 ⋮ 625 name: "unobtainiumHuts", ⋮ 629 "hutPriceRatio" : -0.25 ⋮ 637 name: "eludiumHuts", ⋮ 641 "hutPriceRatio" : -0.1
js/workshop.js lines 598–641 at 781e379 · upstream ↗ 2384 "workshop.concreteHuts.label": "Concrete Huts", ⋮ 2462 "workshop.eludiumHuts.label": "Eludium Huts", ⋮ 2514 "workshop.ironwood.label": "Ironwood Huts", ⋮ 2657 "workshop.unobtainiumHuts.label": "Unobtainium Huts",
res/i18n/en.json lines 2384–2657 at 781e379 · upstream ↗ 484 name: "hut", ⋮ 491 priceRatio: 2.5,
js/buildings.js lines 484–491 at 781e379 · upstream ↗ - Rests on Upgrades lower a building's ratio toward 1 but never to it: reductions count in full up to 75% of , and past that each adds less, so their sum stays short of . (the limit is the ratio less 1, and reductions count in full up to three quarters of it)
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodeantimatter-dimension.js 337
How we know
The eight Antimatter Dimensions start at 10, 100, 10⁴, 10⁶, 10⁹, 10¹³, 10¹⁸, and 10²⁴ antimatter.
337 const BASE_COSTS = [null, 10, 100, 1e4, 1e6, 1e9, 1e13, 1e18, 1e24];src/core/dimensions/antimatter-dimension.js line 337 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodeantimatter-dimension.js 339
How we know
After every 10 bought, tiers 1–8 multiply their price by 10³, 10⁴, 10⁵, 10⁶, 10⁸, 10¹⁰, 10¹², and 10¹⁵, about 2.0× to 32× per purchase.
339 const BASE_COST_MULTIPLIERS = [null, 1e3, 1e4, 1e5, 1e6, 1e8, 1e10, 1e12, 1e15];src/core/dimensions/antimatter-dimension.js line 339 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodeantimatter-dimension.js 359–364, 544–566
How we know
A dimension's price is the cost function (antimatter-dimensions/calculate-cost) at : flat for each set of 10, then a jump; the bump count moves only in Normal Challenge 9 and Infinity Challenge 5.
363 return this.costScale.calculateCost(Math.floor(this.bought / 10) + this.costBumps);src/core/dimensions/antimatter-dimension.js lines 359–364 at 5409e32 · upstream ↗ src/core/dimensions/antimatter-dimension.js#L544-L566 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodemath.js 377–385
How we know
The exponential cost scaling's cost function returns, for , , times once exceeds the number of purchases before scaling by , so the ratio between steps grows by each step.
382 ? currentPurchases * logMult + logBase + 0.5 * excess * (excess + 1) * this._logCostScalesrc/core/math.js lines 377–385 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abcVerifiedIvarK/AntimatterDimensionsSourceCodeantimatter-dimension.js 350–357; math.js 347–349
How we know
The threshold,
Number.MAX_VALUE(≈ 1.8 × 10³⁰⁸), becomes sets: 103 (1,030 bought) for the 1st Dimension, and 19 for the 8th.355 scalingCostThreshold: Number.MAX_VALUEsrc/core/dimensions/antimatter-dimension.js lines 350–357 at 5409e32 · upstream ↗ 348 this._purchasesBeforeScaling = Math.ceil(src/core/math.js lines 347–349 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodecache.js 65–68; antimatter-dimension.js 354
How we know
The post-threshold factor is 10 minus the effects of a Break Infinity upgrade (antimatter-dimensions/cost-scale-upgrade) and Eternity Challenge 6's reward.
65 dimensionMultDecrease: new Lazy(() => 10 - Effects.sum(src/core/cache.js lines 65–68 at 5409e32 · upstream ↗ 354 costScale: Player.dimensionMultDecrease,src/core/dimensions/antimatter-dimension.js line 354 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodebreak-infinity-upgrades.js 116–128, 3–9, 21–36
How we know
The Break Infinity upgrade “Reduce post-infinity Antimatter Dimension cost multiplier scaling” lowers by 1 per purchase, at most 7 times, to 3 before Eternity Challenge 6; it costs Infinity Points.
121 description: "Reduce post-infinity Antimatter Dimension cost multiplier scaling",src/core/secret-formula/infinity/break-infinity-upgrades.js lines 116–128 at 5409e32 · upstream ↗ 9 cost: () => config.initialCost * Math.pow(config.costIncrease, player.infinityRebuyables[config.id]),src/core/secret-formula/infinity/break-infinity-upgrades.js lines 3–9 at 5409e32 · upstream ↗ 23 return Currency.infinityPoints;src/core/break-infinity-upgrades.js lines 21–36 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedIvarK/AntimatterDimensionsSourceCodetickspeed.js 154–161, 150–152; cache.js 60–63
How we know
Tickspeed upgrades use the same class per purchase, not per 10: with bought, the next costs antimatter up to the
Number.MAX_VALUEthreshold (306 purchases), and past it their own factor (10 without upgrades) applies.157 baseIncrease: 10,src/core/tickspeed.js lines 154–161 at 5409e32 · upstream ↗ 151 return this.costScale.calculateCost(player.totalTickBought + player.chall9TickspeedCostBumps);src/core/tickspeed.js lines 150–152 at 5409e32 · upstream ↗ 60 tickSpeedMultDecrease: new Lazy(() => 10 - Effects.sum(src/core/cache.js lines 60–63 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abCodeCookie Clicker main.js v2.058 · Pecorella 2016
How we know
A price that grows by a factor of per purchase doubles every purchases.
Game.priceIncrease=1.15;
main.js#L7972 · archived copy ↗ $cost_{next} = cost_{base} \times (rate_{growth})^{owned}$
· archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedCookie Clicker main.js v2.058 · Pecorella 2016 · Cookie Clicker Wiki, “Building”
How we know
The shown bulk price is the geometric sum , discounted and rounded up once: 20.30× the next single price for 10, and 7.83 million× for 100.
price+=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,i-this.free));
main.js#L8096-L8105 · archived copy ↗ $cost = b * \frac{r^k(r^n-1)}{r-1}$
“BONUS CONTENT!” · archived copy ↗ \text {Price of Buy 10} = \text {Price} \times 20.303718238
Building Prices · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Dev blogPecorella 2016
How we know
For a plain exponential (base , rate , and owned), Pecorella gives the most you can buy with currency as .
$max = floor(log_r(\frac{c(r-1)}{b(r^k)}+1))$
“BONUS CONTENT!” · archived copy ↗ - ^CodeCookie Clicker main.js v2.058
How we know
Each type's production is its count times its stored rate per building, summed into cookies per second, so before upgrades income grows linearly with count.
me.storedTotalCps=me.amount*me.storedCps;
main.js#L5276-L5285 · archived copy ↗ - ^ abcdCodeCookie Clicker main.js v2.058
How we know
With income linear in the count, waits shrink until owned, then each is times the last, a ratio that nears as grows.
me.storedTotalCps=me.amount*me.storedCps;
main.js#L5276-L5285 · archived copy ↗ Game.priceIncrease=1.15;
main.js#L7972 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abVerifiedCookie Clicker main.js v2.058
How we know
Base production before upgrades is 0.1 cookies/s for the Cursor, set in its own production function, and to two significant figures for building : Grandma 1, Farm 8, Mine 47, Factory 260, and so on up to You at 5.1 × 10¹⁴.
this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.5+2))*10)/10;//0.45 used to be 0.5
main.js#L8018-L8022 · archived copy ↗ return me.baseCps*mult;
main.js#L9104-L9109 · archived copy ↗ return Game.ComputeCps(0.1,
main.js#L9001 · archived copy ↗ return ((base)*(Math.pow(2,mult))+bonus);
main.js#L8912-L8916 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^VerifiedCookie Clicker main.js v2.058
How we know
On Grandma income alone, the wait for the next Grandma is 115 s for the 2nd, a low of 38 s for the 8th, and 36 minutes for the 51st.
var price=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,this.amount-this.free));
main.js#L8090-L8095 · archived copy ↗ me.storedTotalCps=me.amount*me.storedCps;
main.js#L5276-L5285 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^ abDev blogPecorella 2016
How we know
In Pecorella's account, production first outruns costs, multipliers keep it close, and a prohibitive wait for the next generator marks the time to prestige.
But eventually the costs become overwhelming, and the time you would have to wait to be able to afford the next generator gets prohibitively long.
· archived copy ↗ - ^VerifiedCookie Clicker main.js v2.058
How we know
Only the Cursor keeps its
Game.Objectconstructor price; the formula overwrites the rest (the Farm's 500 becomes 1,100).if (this.n!=0)
main.js#L8003-L8034 · archived copy ↗ main.js#L9104 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^CodeCookie Clicker main.js v2.058
How we know
Bulk options are 1, 10, and 100; “All” works only in sell mode and means 100 in buy mode.
if (Game.buyMode==1 && Game.buyBulk==-1) Game.buyBulk=100;
main.js#L8816-L8825 · archived copy ↗ - ^VerifiedCookie Clicker main.js v2.058
How we know
buy()charges each unit's rounded-up price in turn and ignores the shown total: 10 Grandmas from zero cost 2,035, not 2,031, and 2,030 cookies still buy 9.if (Game.cookies>=price)
main.js#L8125-L8152 · archived copy ↗ Game.ObjectsById[what].buy();
main.js#L8898-L8901 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^VerifiedCookie Clicker main.js v2.058
How we know
Each sale pays 25% of the next one's price, rounded down, about 15% more than the label: selling 1 of 10 Grandmas shows 88 and pays 101.
price=Math.floor(price*giveBack);
main.js#L8156-L8176 · archived copy ↗ var giveBack=0.25;
main.js#L8106-L8123 · archived copy ↗ buildings now sell back for 25% of their current price (down from 50%)
main.js#L1620-L1628 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^CodeIvarK/AntimatterDimensionsSourceCode · break_infinity.js 2.0.0player.js 942–947; package-lock.json 6524–6525
How we know
Outside challenges, a Big Crunch (Infinity, the first prestige reset) unlocks when this Infinity's peak antimatter reaches
Decimal.NUMBER_MAX_VALUE, the cost threshold's ≈ 1.8 × 10³⁰⁸.945 const goal = challenge === undefined ? Decimal.NUMBER_MAX_VALUE : challenge.goal;src/core/player.js lines 942–947 at 5409e32 · upstream ↗ 6524 "node_modules/break_infinity.js": { 6525 "version": "2.0.0",
package-lock.json lines 6524–6525 at 5409e32 · upstream ↗ var NUMBER_MAX_VALUE = D(Number.MAX_VALUE);
break_infinity.js#L1550 · archived copy ↗ - ^CodeIvarK/AntimatterDimensionsSourceCodeantimatter-dimension.js 388–390, 227–242
How we know
“Buy until 10” charges price × purchases left in the set, exact since the price is flat within a set.
389 return this.cost.times(this.remainingUntil10);src/core/dimensions/antimatter-dimension.js lines 388–390 at 5409e32 · upstream ↗ src/core/dimensions/antimatter-dimension.js#L227-L242 · upstream ↗ - ^ abVerifiedIvarK/AntimatterDimensionsSourceCodemath.js 387–429; antimatter-dimension.js 320–331
How we know
Max-buy counts the whole sets affordable but charges only the most expensive set × 10, about 0.1% under the sum at ×1,000 per set.
NOTE! this assumes you only have to pay for the most expensive thing you get when you buy in bulk.
src/core/math.js#L387-L429 · upstream ↗ 331 dimension.currencyAmount = dimension.currencyAmount.minus(Decimal.pow10(maxBought.logPrice));src/core/dimensions/antimatter-dimension.js lines 320–331 at 5409e32 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^CodeCookie Clicker main.js v2.058 · IvarK/AntimatterDimensionsSourceCodemath.js 387–429
How we know
A long bulk purchase whose price grows by a factor of per item costs about times its last price.
price+=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,i-this.free));
main.js#L8096-L8105 · archived copy ↗ NOTE! this assumes you only have to pay for the most expensive thing you get when you buy in bulk.
src/core/math.js#L387-L429 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Dev blogPecorella 2016
How we know
Pecorella, crediting the AdCap wiki, gives AdVenture Capitalist's Lemonade Stand growth 1.07, base cost 4, and 1.67/s each; with the first free, the price is .
With AdVenture Capitalist Lemonade Stands, the $rate_{growth} = 1.07$, $cost_{base} = 4^*$, and $production_{base} = 1.67/sec$. … It’s technically 3.738, since you get the first one for free and it’s actually the second one that costs 4.
· archived copy ↗ - ^Codedoublespeakgames/adarkroomroom.js 1025–1027
How we know
The build action does nothing at the item's maximum count, so the cap, not the price, ends each building's run.
1025 if (craftable.maximum <= numThings) {script/room.js lines 1025–1027 at 1fada46 · upstream ↗ - ^Codedoublespeakgames/adarkroomoutside.js 177–179, 11
How we know
Each hut adds room for 4 villagers; the maximum population is huts × 4.
178 return $SM.get('game.buildings["hut"]', true) * Outside._HUT_ROOM;script/outside.js lines 177–179 at 1fada46 · upstream ↗ 11 _HUT_ROOM: 4,script/outside.js line 11 at 1fada46 · upstream ↗ - ^DeveloperCookie Clicker main.js v2.058
How we know
The changelog dates the launch to 8 August 2013; Orteil says he made the original “in a couple hours, for laughs”.
made <a href="https://orteil.dashnet.org/experiments/cookie/" target="_blank">the game</a> in a couple hours, for laughs
main.js#L2020-L2021 · archived copy ↗ - ^Dev blogTownsend 2013
How we know
doublespeak games announced A Dark Room as “a minimalist text adventure” in a blog post dated 10 June 2013.
Announcing A Dark Room, a minimalist text adventure by doublespeak games.
· archived copy ↗ - ^DeveloperIvarK/AntimatterDimensionsSourceCodeInformationModal.vue 23–24
How we know
The About screen says Finnish developer Hevipelle began the game as a solo project in 2016, later expanded by a large team.
23 Antimatter Dimensions is an Idle Incremental game created by Finnish developer Hevipelle. Originating as a solosrc/components/modals/InformationModal.vue lines 23–24 at 5409e32 · upstream ↗ - ^DeveloperCookie Clicker main.js v2.058
How we know
The changelog's 24 August 2013 “big update!”, which “revamped the whole game (new graphics, new game mechanics)”, falls between two Wayback captures, the original version of 13 August 2013 and v1.035 of 10 September 2013.
24/08/2013 - big update!
main.js#L2014 · archived copy ↗ revamped the whole game (new graphics, new game mechanics)
main.js#L2015 · archived copy ↗
Sources
Code
- Kerajärvi), Hevipelle (Ivar and Antimatter Dimensions contributors. 2026. “Antimatter Dimensions source code.” Commit 5409e32. IvarK/AntimatterDimensionsSourceCode @ 5409e32 · licence, all uses
- Patashu and Timothy Stiles. 2019. “break_infinity.js 2.0.0, dist/break_infinity.js.” original · archived · licence, all uses
- Unicorn), bloodrizer (Nuclear and Kittens Game contributors. 2026. “Kittens Game source code.” Commit 781e379. nuclear-unicorn/kittensgame @ 781e379 · licence, all uses
- Lantz, Frank. 2022. “Universal Paperclips, globals.js (Wayback capture of 6 January 2022).” Version the version captured 2022-01-06 and 2022-04-02. original · archived · licence, all uses
- Lantz, Frank. 2022. “Universal Paperclips, main.js (Wayback capture of 5 January 2022).” Version the version captured 2020-11-12 through 2022-01-05. original · archived · licence, all uses
- games), Michael Townsend (doublespeak and A Dark Room contributors. 2025. “A Dark Room source code.” Commit 1fada46. doublespeakgames/adarkroom @ 1fada46 · licence, all uses
Primary
- Pecorella, Anthony. 2016. “The Math of Idle Games, Part I.” Kongregate Developers Blog. Kongregate. original · archived · licence, all uses
- Townsend, Michael. 2013. “A Dark Room released.” doublespeak games blog. doublespeak games. original · archived · licence, all uses