That's up by a quarter of a million - 7% - on the week before when there were 3.5m Covid infections recorded.
The number of people testing positive across the UK has been rising since the start of June but the rate of rise is showing signs of slowing down.
Other, more recent figures, hint cases may be on the way down.
The ONS data is always a couple of weeks behind the curve for new infections but this big dataset gives the most accurate overview for the UK.
Other data sources, such as the government Covid dashboard - which is more current but reflects far fewer Covid test results - suggest that for England the number of new infections may already have peaked.
In the latest report, for the week ending 13 July, the ONS estimates Covid rates were:
* One in 17 in England - up from one in 19 the week before
* One in 17 in Wales - the same as the previous week
* One in 20 in Northern Ireland - down from one in 17
* One in 15 in Scotland - up from one in 16
Many of the recent cases have been caused by fast-spreading sub-variants of Omicron, called BA.4 and BA.5.
Nearly eight out of 10 Covid infections in the UK are now caused by BA.5.
People are still able to catch the infection even if they have had Covid before.
But vaccines are still doing a good job of helping protect people from getting very sick with the virus.
The ONS data is collated by testing thousands of people from UK households - whether they have symptoms or not - to estimate how much virus is around.
Kara Steel, senior statistician for the Covid-19 infection survey, said there were some uncertain trends in the latest data across Scotland, Wales and Northern Ireland.
She added: "It is too early to say if this most recent wave is starting to peak, but we will continue to closely monitor the data."
Separate data shows, on average, week on week, hospital cases have started to ease in Scotland and England.
In England on 18 July, there were, on average, about 1,720 new hospital admissions with a positive Covid test, each day.
The week before, the figure was 1,861.