Stuart joined the rush and broke for the net and had Joe Thornton's shot deflect off him and past Reto Berra for the winner.
Logan Couture and Patrick Marleau also scored for San Jose (11-2-5). The Sharks snapped a five-game winless skid. During the span, they had three shootout losses and one loss in overtime.
San Jose dominated play throughout the game, outshooting Calgary 35-13. The Sharks were particularly strong in the first two periods, building a 2-0 lead with a 28-6 edge in shots.
Mike Cammalleri and Kris Russell scored for Calgary (6-9-3) in the third period. The Flames are winless in their past four.