The Etixx-Quick Step rider, who crashed out in the first stage of last year, had appeared far from his brilliant best in the first sprints of the Tour but the Briton delivered in Brittany.
Cavendish perfectly timed his effort to leapfrog German Andre Greipel (Lotto-Soudal), who finished second after winning two stages this year.
Slovakian Peter Sagan finished third.
“I probably had the same power as the other days, but if you hit out early you can’t do it,” said Cavendish, who is eight shy of Belgian Eddy Merckx’s record of 34 stage wins on the Tour.
“It was a long time (I had not won) on the Tour de France, I was kind of impatient.”
Even in the absence of German Marcel Kittel, who won eight stages in the last two editions, the Tour sprints are still more contested than anywhere else.
“With the calibre of the sprints these days now it’s maybe one out of 10 times,” said Cavendish.
Cavendish had not raised his arms as a winner on the Tour since the 13th stage in St Amand Montrond in 2013.
Briton Chris Froome of Team Sky is the overall leader after German Tony Martin abandoned the race with a collarbone fracture on Thursday, which made Cavendish’s win even sweeter as Etixx-Quick Step found something to cheer about.
“We knew losing Tony would be a big loss to the team, we said we would win for him today,” the 30-year-old Cavendish said.
“It’s almost as if we had started the race with 12 guys and we’re eight now.”
Froome, who did not wear the distinctive yellow jersey out of respect for Martin, leads Sagan by 11 seconds and American Tejay van Garderen (BMC Racing) by 13.
Spain’s Alberto Contador (Tinkoff-Saxo), who fell off his bike in the neutral zone, is seventh and 36 seconds off the pace.
Defending champion Vincenzo Nibali of Italy, who was caught up in a crash on Thursday, is 12th and 1:38 behind Froome while Colombian Nairo Quintana, the last member of the Big Four, lies 16th, 1:56 off the pace.
Saturday’s eighth stage will take the peloton over 181.5 km from Rennes to Mur de Bretagne, up a short but punchy climb.
(Reporting by Julien Pretot; Editing by Alan Baldwin)