What do you mean by deficit?

Defecit occurs when public spending exceeds the government revenue. Their should be a balance between the government spends in countries welfare and the taxes that the government gets from people. Hence when any one exceeds over the other that is termed as defecit. Proper calculation and predictions are done by economist to control and avoid deficit.

A budget deficit can be an indicator of financial health. Though the term deficit could also be used when considering individual and business spending patterns, it primarily refers to government spending within an economy. The deficit is all government expenditures that exceed revenues.

E.g. let expenditure = x, and revenue = y. Assuming a budget deficit, x > y and the deficit = (x-y). This positive shortfall (x-y) is often financed by government borrowing from other countries and financial institutions thus increasing the government debt. This debt can then be eliminated by achieving a budget surplus (y>x) in subsequent years.