That was more than double the pace recorded in the previous three months, and above estimates of 2.2%.
The rise, helped by an increase in exports, is a further sign that the economy may be getting back on track.
The government had originally estimated that GDP grew at a 1.7% rate in the second quarter.
The revised non-annualized quarter on quarter figure was 0.6%, up from an initial 0.4% estimate.
Housing and business investment, two key sectors of the economy, remained strong in the revised figures.
Housing construction grew at an annual rate of 12.9%, the fourth consecutive quarter of double-digit growth.
Meanwhile, business investment was revised up to a 16.1% rate.
The government also said data from retailers showed they had restocked their shelves at a faster pace in the April-to-June period than first thought.
The positive news could make US central bank economists more likely to begin reducing monthly bond purchases later this year.
The programme is one of the US’s last stimulus measures.
Economists think growth will stay at the 2.5% rate in the second half of the year, boosted by steady job gains and less drag from federal spending cuts.
mjd75N1OpYAAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…