The result was the second best figure in the past two decades, the finance ministry said on Wednesday. It followed a record 61.77 billion crown surplus in 2016, when the country was receiving big refunds from the European Union covering projects from the previous budget period.
"We regard it as a very good result," Finance Minister Alena Schillerova said.
Officials had seen some chances of a second straight surplus as the economy has been growing strongly although the impact of EU funds remained an open question.
Overall expenditure last year rose 4.9 percent but came in lower than planned. Income dipped 0.6 percent year-on-year, although it was higher than the budget plan, helped by tax collection being 41.1 billion crowns higher than expected.
The 2017 budget forecast a 60 billion crown deficit and lawmakers last month approved the 2018 plan with a 50 billion crown gap.
The central state budget is the main part of the EU country's overall public sector finances, which also include local and regional administrations, the health insurance system and various off-budget funds.
Deputy Finance Minister Petr Pavelek said the overall surplus was around 1 percent of economic output in 2017, roughly in line with expectations. Next year should see a similar surplus, according to ministry estimates.
The Czech economy likely grew more than 4 percent last year, according to Finance Ministry and central bank estimates, and should expand by more than 3 percent in the next two years. That, along with unemployment falling to the lowest in the European Union, has boosted tax income for the state.
Still, the government under new Prime Minister Andrej Babis may have trouble repeating the budget successes of past years.
"We expect the deficit to end with a slightly deeper deficit than approved for this year," Raiffeisenbank analyst Frantisek Taborsky said in a note, citing higher expenditure stemming from EU subsidies co-financing and debt servicing.
Babis, a billionaire businessman who entered politics in 2011, has promised higher infrastructure investments and tax cuts. Schillerova, who was a deputy under Babis when he ran the finance ministry in the previous government, said that there was "huge room" for government investments.
Babis and his ANO party won an October election by a landslide. The party has formed a minority government but must still win a confidence vote next week, which is very unlikely given other parties' objections and ANO's only 78 seats in the 200-strong lower chamber of parliament.
However, President Milos Zeman has said Babis will get a second try at forming a government, meaning he could stay on to rule for an amount of time even without parliament's confidence.