Coleman also had an assist, and Oliver Kylington, Adam Klapka and Kevin Rooney scored for the Flames (38-39-5). Dustin Wolf made 16 saves.
Fabian Zetterlund scored for the Sharks (19-54-9). Devin Cooley allowed five goals on 23 shots before being replaced midway through the game by Georgi Romanov, who made 14 saves.
It was the final regular-season game for each team. Calgary has failed to qualify for the Stanley Cup Playoffs for the third time in four seasons; San Jose has missed the playoffs in five straight seasons.
Klapka scored his first NHL goal in his sixth game to give the Flames a 1-0 lead at 12:13 of the first period. He shot top corner over Cooley's right shoulder from the slot.
Coleman pushed it to 2-0 at 14:40, a backdoor tap-in on a Connor Zary pass on the power play.
Kylington made it 3-0 at 3:53 of the second period with a wrist shot through a screen, and Rooney extended the lead to 4-0 at 5:59 with a shot from the slot over Cooley's right shoulder.
Weegar beat Cooley over the glove with a shot from the point for a 5-0 lead at 6:56. Cooley was replaced by Romanov after the goal.
Zetterlund scored on the power play with nine seconds remaining for the 5-1 final.