Mike Grier and Jonathan Cheechoo scored for the Sharks in the final period. Less than three minutes into the third period Grier scored his 11th career goal against the Flames, his most against any team. Cheechoo scored an insurance goal 3 minutes later. It was his 11th goal in the last eight games.
Jarome Iginla scored twice and Kristian Huselius added a goal for the Flames, who missed a chance to clinch the final playoff spot in the Western Conference when Colorado beat Vancouver earlier in the evening.
The Sharks solidified their hold on the fifth spot in the playoffs and set a franchise record with 106 points. San Jose reached the milestone after recording its fifth straight victory.
The Sharks are 13-1-2 in their last 16 games, while the Flames lost for just the second time in eight games and saw their four-game road winning streak end.
After winning its game against St. Louis, Nashville remained in control of fourth place in the playoff picture. The Sharks are in control of fifth and would begin the playoffs on the road against Predators.
If Nashville should lose its final game and Sharks win, San Jose would finish fourth because it holds the tiebreaker.
San Jose holds three-point lead over sixth-place Dallas. The Stars have two games remaining while Sharks have one.
The Avalanche drew within three points of Calgary, and have two games remaining - including their season finale against the Flames in Denver.
San Jose dominated action in the first period but couldn't break through against Flames goalie Miikka Kiprusoff.
Michalek gave the Sharks a 1-0 lead 8 minutes into the second period, aided by Joe Thornton's 89th assist. He added his 90th on Cheechoo's goal.
Thornton joined Wayne Gretzky and Mario Lemeiuex as the only players in NHL history with back-to-back 90-assist seasons.
Bell caught Kiprusoff leaning the other way less than two minutes later to give the Sharks a 2-0 edge. Patrick Marleau took a shot from above the right faceoff circle and Bell was in position for the rebound.
After a timeout was called by Calgary's coach Jim Playfair, the Flames scored their first goal when Huselius scored his 34th goal of the season.
Notes: Flames D Robyn Regehr suffered a leg injury during the second period and didn't return. ... Calgary D Brad Stuart topped 300 career penalty minutes when he was assessed two minors. ... San Jose's Ron Wilson moved into 11th place for games coached with his 1,008th, breaking a tie with Jacques Demers. ... The Sharks began the day tied with Montreal for the best power-play percentage in the league at 22.6 per cent. ... Flames RW Jarome Iginla has 15 goals and 25 assists in his last 25 games. ... Michalek has scored four of his 25 goals against the Flames. ... The Sharks' 42 shots matched a season high.