Definition of Balanced budget: When total government spending equals government tax receipts. A budget surplus when spending is less than revenue is also considered a balanced budget.
Usually, governments have a political incentive to spend more money than they actually have. This leads to a budget deficit because they need to borrow from the private sector. However, if the government increase taxes then they might be able to balance the budget.
UK Government Borrowing 1955-2024

This shows there was a brief period of a balanced budget in 1998-99 to 2001-02. Previously there had been surplus in 1969-90, 1988-89,
Balanced Budget over course of Economic Cycle
Usually, during a downturn in the economy, the government get a fiscal deficit. However, during a period of growth this deficit declines due to increased tax revenues and lower spending. Therefore, when people refer to a balanced budget they usually mean during the course of the trade cycle
The chancellor’s golden rule is to allow government borrowing of up to 3% of GDP
Balanced Budget Constitutional Amendment

US federal deficit was briefly in surplus in 2000.
The US has toyed with the idea of a constitutional amendment to legally bind the Government to limit borrowing. It was felt that a legal amendment would prevent political pressures from creating a large deficit. However, the amendment was narrowly defeated. Amongst other arguments, it was suggested that a balanced budget can be harmful in a period of recession.
Deficit and balance in wider economy
In one sense a government budget deficit requires a surplus in private sector/external – rest of world.

Related
- How important is the budget deficit?
- Should the government run a budget surplus?
- Problems of Government Borrowing
Tejvan Pettinger studied PPE at LMH, Oxford University.