A government's deficit is how much more it spent than it collected in one budget period; its debt is the accumulated total of every unpaid past deficit, plus interest. Revenue mostly comes from taxing income, corporate profit, and consumption; spending covers running the state, funding specific programs, and servicing existing debt. NationCraft, a free mobile government simulator, runs this same loop every in-game month so the cause and effect are visible immediately rather than buried in an annual report.
This page is published by the developer of NationCraft. The explanation of real-world government budgeting above is general and does not depend on the game; the worked example partway down describes how NationCraft specifically models it, which is a simplified simulation, not a claim about how any real treasury operates.
Governments talk about their finances using two different numbers, and mixing them up is the single most common source of confusion. The deficit is a flow: how much more a government spent than it collected during one budget period, usually a year. The debt is a stock: the running total of every past deficit that has not yet been paid off, plus whatever interest has accumulated on top of it.
A government running a deficit this year is spending more than it is taking in right now. A government carrying debt is still paying for spending decisions made in earlier years, sometimes decades earlier. The two do not move together. A country can run a deficit this year and still see its total debt shrink, if a large enough surplus the year before more than covered it. A country can run a small deficit and still watch its debt climb every year, because even a small deficit gets covered by new borrowing added to the pile, while interest on the existing debt is paid out of current revenue rather than left to accumulate onto the principal.
That is why "the deficit went down" and "the debt went down" are different claims, and why "the debt is huge" says nothing about whether this year's spending is under control. A deficit describes one period. Debt describes the sum of every period that came before it.
Most governments draw on a recurring set of sources, and three of them account for the bulk of typical tax revenue:
Beyond those three, governments commonly draw on trade-related income, such as tariffs on cross-border commerce, and smaller or developing economies often receive foreign aid or grants from other countries and institutions. None of these sources collects every dollar it is theoretically owed on paper. Enforcement has a cost, some economic activity happens off the books, and a government's own administrative capacity determines how much of a levied tax actually reaches the treasury.
Spending splits into a few recurring categories. There is the baseline cost of running the state: administration, courts, basic public order, the machinery of governing that exists regardless of which specific policies are layered on top. There is program spending: whatever policies a government has chosen to fund, healthcare, infrastructure, defense, education, each carrying its own ongoing operating cost once it exists, not just a one-time price tag to start it. There is often a welfare or subsidy layer, direct transfers to households or industries the government has decided to support. And if the government has borrowed in the past, there is debt service: the interest and principal owed on outstanding bonds or loans, a fixed claim on this year's revenue that was agreed to years earlier and does not disappear just because a new budget cycle started.
That last category is why debt matters even in a year when a government is not currently overspending. Debt service competes with every other spending priority a government has today, using money that a past version of the government already promised away.
A tax rate on paper and the revenue a government actually receives are two different numbers, and the gap between them is usually called collection efficiency. It is not fixed. Weak administrative capacity means audits, enforcement, and basic record-keeping cost more relative to what they recover, so a poorer state keeps less of what its tax code technically demands. Corruption compounds the same problem from the other direction: revenue that should reach the treasury gets diverted, under-reported, or simply never chased, and the diversion scales with how deeply corruption runs through the collecting institutions. The practical result is that two countries with identical tax rates on paper can end up with very different revenue in practice, purely because one collects more efficiently than the other.
NationCraft is a free government and economy simulator for phones, with no ads and no in-app purchases, that runs entirely offline. Instead of an annual budget, it recalculates revenue and expenses every in-game month, so a policy change or a tax adjustment shows its consequences within a few ticks rather than being buried in a once-a-year report.
The player sets an income tax rate, a corporate tax rate, and a VAT rate directly, and NationCraft calculates monthly revenue from those three taxes (plus trade income and, for some starting scenarios, foreign aid). Every tax revenue is then multiplied by a collection efficiency factor that falls as corruption rises and as GDP per capita falls, exactly mirroring the real-world dynamic above: a poor or corrupt nation in the simulation collects a smaller share of what its tax rates imply on paper than a wealthy, clean one collecting at the identical rate. A high-corruption, low-income nation can lose close to half its theoretical tax take to this single mechanism before a single dollar is spent.
Expenses in the simulation follow the same shape as the real-world categories above. There is a baseline cost of simply running the government, scaled to the size of the economy. There is the ongoing operating cost of every policy the player has bought, since policies in NationCraft carry a recurring upkeep cost, not just a one-time purchase price. There is a welfare cost that scales with population and how developed the economy has become. There are sector subsidies, if the player has chosen to fund any. And if the player has issued bonds, there are bond payments, the simulation's version of debt service, added on top of everything else every month.
NationCraft keeps the deficit-versus-debt distinction the real world requires. Each month, revenue minus expenses changes the treasury balance directly, which is the flow: a bad month drains it, a good month builds it back up. Debt, in the simulation, specifically means the outstanding principal on bonds the player has issued to borrow money, a separate stock that only grows when a bond is issued and only shrinks when it is repaid or matures. A player can run a rough month, denting the treasury, without that month adding one dollar to debt, exactly as a real government can post a rough fiscal year without necessarily issuing new bonds to cover it. Borrowing and running low on cash are related problems, not the same problem.
The simulation is honest about being a simplification: it does not model tariffs by trading partner, multiple currencies, or a legislature that can reject a budget outright, and any player looking for that level of institutional detail should look elsewhere. What it does model is the core loop this page describes: taxes come in at less than their sticker rate once corruption and development are accounted for, spending goes out across the same handful of categories a real budget has, and the deficit each month is a different number from the debt sitting on the books, tracked separately, exactly as it should be.
The deficit is a flow: how much more a government spent than it collected in one budget period, usually a year. The debt is a stock: the accumulated total of every unpaid past deficit, plus interest. A government can run a deficit while its debt shrinks (if a prior surplus covered it) or run a small deficit while its debt keeps growing (because even a small deficit adds new borrowing to the pile each year, while interest on the existing debt is paid out of current revenue).
The bulk of typical government revenue comes from income tax (on what people earn), corporate tax (on company profits), and consumption tax such as VAT or sales tax (on what people spend). Trade-related income like tariffs and, for some countries, foreign aid or grants make up smaller additional sources.
Spending splits into the baseline cost of running the state itself (administration, courts, public order), program spending on whatever specific policies the government funds, a welfare or subsidy layer of direct transfers, and debt service, the interest and principal owed on money borrowed in earlier years.
The revenue a government actually collects is usually lower than its tax rate on paper suggests, and the gap is called collection efficiency. Weak administrative capacity in poorer states makes enforcement and record-keeping costlier relative to what they recover, and corruption diverts revenue that should reach the treasury, so identical tax rates can produce very different real revenue depending on how efficiently a state collects.
NationCraft recalculates revenue and expenses every in-game month. Revenue comes from income tax, corporate tax, and VAT rates the player sets, multiplied by a collection efficiency factor that falls as corruption rises and GDP per capita falls. Expenses cover baseline government cost, policy upkeep, welfare, subsidies, and bond payments. The treasury balance (the deficit's running effect) and total bond debt are tracked as separate numbers, mirroring the real-world deficit-versus-debt distinction.
Related: how countries go bankrupt, best government simulation games, games for policy wonks.