Free swimming for under-16s and over-60s in England will be axed from the end of July as part of government cuts.
The scheme, introduced in April 2009, was due to run until next March but ministers say it was not good value.
They say although 18 million free swims were taken up in the first year - many of those who took part would have done so anyway, even if they had to pay.
Ending the scheme on 31 July will save £40m of the £140m cost of the scheme, the government says.
When the scheme was introduced the previous Labour government said it was aimed at getting people more physically active, and ensure a lasting legacy for the 2012 Olympics.
The cost was shared between five government departments.
But the new coalition government has been reviewing schemes, as it seeks to make cuts to reduce the record budget deficit.
Consultants Pricewaterhouse Coopers were asked to examine the swimming scheme to see if it had increased the number of swimmers and the "health and consequent economic benefits".
Their report said in the first year of the scheme 261 local authorities applied for the programme most of which had offered free swims to children and the over-60s but 64 of which concentrated on the over-60s.
The analysis showed that more youngsters took up the offer than over-60s. It also shows that the scheme encouraged more paying swimmers to take part - for example adults accompanying children.
About 138,000 extra paying customers went swimming in the first year of the scheme.
It also said that over-60s who took part increased their swimming sessions so the number reaching the government-recommended average of 30 minutes exercise a day went up from 66.2% of those surveyed to 78.4%.
For under 16s - who are supposed to do 60 minutes exercise a day - 32.9% managed to hit the target after free swimming was introduced, up from 20.7% beforehand.
Of swimmers surveyed, 82.5% of the over-60s said they were likely to have gone anyway. Of the under-16s the figure was 72.9%.
Sport and Olympics Minister Hugh Robertson said: "The research shows that the great majority of free swimmers were swimming already, and would have paid to swim anyway. With a crippling deficit to tackle and tough decisions to take, this has become a luxury we can no longer afford."
But he said under plans to reform Lottery money an extra £50m should go into sports facilities by 2012.
"Our plans to deliver a community sports legacy, in partnership with Sport England, are progressing well and we expect to make a full announcement in July."
Axing the swimming scheme, a new visitor centre for Stonehenge and the British Film Institute film centre will save the Department for Culture, Media and Sport about £73m - it says.