The on-the-night total raised by Red Nose Day was up this year for the first time in six appeals.
The fundraising event had raised more than £38.6m by the end of the live television show on Friday night, up from £31.9m at the same stage last year.
This year’s total has since passed £40m, organisers Comic Relief said.
The highest on-the-night total was £78m, raised in 2015.
Red Nose Day ran every two years until 2021, when Comic Relief decided to make it an annual event.
This year’s event marked the final appearance as host of Sir Lenny Henry after almost 40 years.
Fundraising efforts included a 500km cycling challenge completed by the DJ Mollie King, which raised more than £1.1m, and a 50km Arctic trek by celebrities including the businesswoman Sara Davies and the presenters Alex Scott and Laura Whitmore, which raised more than £630,000.
The show itself featured a reunion of the cast of W1A as they attempted to find a host to replace Henry, a star-studded version of the game show The Traitors, and tributes to Henry.
Samir Patel, chief executive of Comic Relief, said the charity was proud of the fundraising total so far.
“Tonight was a reminder that when people come together, great things can happen,” he said.
“With so many people struggling, and with millions impacted by poverty and injustice, the money raised this Red Nose Day will make a life-changing difference to so many people here in the UK and around the world.”