Dominic Mills and Henry Burton, both 17, set off from Bath Abbey in the early hours of the morning on Saturday, April 6 and walked the Cotswold Way, virtually non-stop, through the night all the way to Chipping Campden.
Dominic said: "The walk was great, but very tough. We did end up having to sleep for two hours from 5am until 7am. We finished the walk at 10pm on the Sunday night meaning in total we walked for 37 hours.
He added: "We did struggle in parts, but we managed to keep going."
Toby Spence, Sibford School head teacher said: "This is a brilliant achievement. I never doubted them, what a remarkable feat of endurance."
The pair have so far raised over £5,700 the Cystic Fibrosis Trust. You can still support them via their Justgiving page.