Germany saw a record budget surplus last year thanks to unbroken economic growth.
The Federal Statistical Office said Friday that public treasuries received 36.6 billion euros ($45 billion) more than they spent in 2017. The figure was slightly less than had been forecast.
Germany has now recorded a surplus for four years straight.
Strong export-driven growth has boosted tax revenue, with the country's gross domestic product rising a further 0.6 percent in the fourth quarter of last year compared with the previous three months.
Germany has also benefited from the European Central Bank's low interest rates, which have made the cost of public borrowing considerably cheaper.
Economists predict Germany's growth will continue this year, rising to 2.4 percent compared with 2.2 percent in 2017.