See when you can afford an upgrade based on current resources and production.
Enter resources and target cost.
The Resource Planner answers the only inventory question that matters: when can I afford it? For each of the five resources — food, wood, stone, iron, gold — you enter current stock, hourly production, and the target cost. The tool computes each deficit and divides by your production rate, then reports the binding constraint: the single resource whose wait time gates the whole purchase. Everything runs on your own numbers, so it is immune to game-balance changes.
Takes what you have, what you need, and how fast you produce, and tells you how long the gap takes to close.
deficit = target - current — Negative means you already have enough and the calculator stops there.Math.ceil(deficit / rate) — Rounded UP — a partial hour of gathering does not finish the job.d = Math.floor(maxHours / 24), h = maxHours % 24 — The longest single resource decides the answer, because you need all of them before you can spend.The slowest resource sets the timeline. That is why the days figure comes from maxHours and not from a total.
Every expression shown in code above is quoted from js/calc-resources.js, which is the file this page actually runs.