That was a faster pace than expected by economists.
It was also up from the growth rate for the first three months of 2013, which was revised lower to 1.1% from 1.8%.
A slowdown was widely expected due to the impact of federal spending cuts, but also from the continuing weakness in the global economy.
In March, $85 billion of public spending was cut as a result of a deal between Democrat and Republican politicians.
But the Commerce Department said that the federal government cut spending by only 1.5% in the April-to-June period, compared with a sharp drop of 8.4% in the first quarter.
The US economy grew by 0.4% in the second quarter compared with the previous three months. That compares to 0.6% growth in the UK in the same period.
The eurozone’s GDP figures are released on August 14. The 18-member region shrank 0.2% in the first quarter – the sixth quarter of decline in a row.
“We have an upside surprise in the GDP, which speaks volumes for the job recovery that we’re putting together,” said Andre Bakhos, a market analyst at Lek Securities in New York.
“The recovery in the economy is starting to take root. This will be an interesting development given the fact that we’ll have a Fed announcement today.”
The Federal Reserve meets on Wednesday to make its latest statement on its massive bond-buying programme to stimulate the economy.
Consumer spending accounts for about 70% of US GDP. Official figures showed that consumers spent less in the second quarter than in the first, with personal consumption expenditure up 1.8%, compared with 2.3% previously.
As well as the last set of quarterly figures, the Commerce Department also revised growth figures going back several decades.
It said the US economy now grew by 2.8% in 2012, up from its previous estimate of 2.2%. This may help to explain why growth appeared weak last year but hiring continued to improve.
The government also said that the economy contracted by 4.3% during the recession, which lasted from December 2007 to June 2009, better than the previous estimate of a 4.7% drop.
The economy expanded by 8.2% from the middle of 2009 through to the end of last year, which was more than the 7.6% previously suggested.
The latest figures showed a pickup in both imports and exports. Exports rose 5.4% in the second quarter, compared with a drop of 1.3% in the first quarter. Imports jumped 9.5%, compared with an increase of 0.6% in the previous quarter.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…