The country will revise all of the deficit figures which it has published since 1995 using the method requested by Eurostat, the European Union's statistics office, the budget ministry added in a statement.
Prime Minister Mariano Rajoy's conservative government had promised the European Union that he would reduce Spain's public deficit to 6.3 percent of gross domestic product in 2012 from 9.4 percent the year before.
To slash the deficit the government has put in place the deepest budget cuts since Spain returned to democracy after the death of dictator Francisco Franco in 1975, which have prompted mass street protests.
When the government announced at the end of February that the public deficit for 2012 stood at 6.74 percent of economic output, it said no new austerity measures would be needed to rein in the public deficit.
But the European Commission, the European Union's executive body, has recommended that Spain limit the number of goods and services which benefit from a lower sales tax rate and raise environmental taxes, especially on fuel.
Spain is trying to reduce its public deficit as it struggles through a double-dip recession, having never recovered from the collapse of a decade-long property boom in 2008.
The Spanish economy, the eurozone's fourth largest, contracted 1.4 percent last year, the second worst yearly slump since 1970, and the Bank of Spain predicted Tuesday that it will shrink by 1.5 percent this year before posting a "modest rebound" in 2014 with growth of 0.6 percent.