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 five people, including a four-month-old baby, have been killed after dozens of tornadoes…
Harvey Weinstein has been hospitalized just days after his 2020 rape conviction in New York…
Hamas has published a video showing the first proof of life of US and Israeli…
Prosecutors and Donald Trump’s attorneys delivered opening statements and the first witness was called on…
The House of Representatives has finally approved $61 billion in new US military aid for…
The real estate market in the United States has always been a gauge for economic…