It was their 15th win in 19 league games, taking them up to 48 points as they seek to end a two-season trophy drought.
Second-placed Bayer Leverkusen, on 37, dropped two points at Freiburg on Saturday with a goalless draw and champions Borussia Dortmund, in third on 36, closed in after beating Nuremberg 3-0 on Friday.
"We were well positioned, tactically moved very well and allowed nothing in the back," Bayern coach Jupp Heynckes, who will be replaced next season by former Barcelona coach Pep Guardiola, told reporters.
"What we were lacking in the first half was a bit of spark, that final cross, that final pass. That is what I told my players at halftime.
"We did it much better in the second half. We upped the pressure and forced them to make mistakes."
Stuttgart were extremely effective at neutralising all of Bayern's offensive moves in the first half and even missed the biggest chance when Martin Harnik's header bounced off the post into the arms of keeper Manuel Neuer.
It was a terrible back pass from Stuttgart defender Cristian Molinaro, however, that gifted Bayern an unexpected lead with Mandzukic intercepting and rounding keeper Sven Ulreich to notch his 12th league goal of the season in the 50th minute.
"It was a shame it happened like that," Molinaro said. "After the first goal Bayern had even more possession and we had no chance against them."
Bayern's second goal had nothing to do with luck, with the Croatia international turning provider and picking out Thomas Mueller in the box in the 72nd minute and the Germany midfielder timed his run perfectly to flick the ball in.
Stuttgart went down to 10 players when Austrian Harnik was booked for a second time for a foul on Franck Ribery.
Earlier on Sunday, Hamburg SV hung on for a narrow 3-2 victory over nine-man Werder Bremen in their traditional northern derby to go ninth and remain in contention for a European spot.
Assani Lukimya gave the visitors a ninth-minute lead when the defender beat Hamburg's Jeffrey Bruma to score with the back of his head.
Hamburg levelled with a stunning goal from South Korean Son Heung-min, who charged down the right and beat keeper Sebastian Mielitz with a surprise shot from a very tight angle.
The hosts struck twice after the restart with Dennis Aogo scoring in the 46th minute and then setting up Artjoms Rudnevs six minutes later but Werder defender Sokratis Papastathopoulos pulled a goal back in the 54th with a shot that slid under keeper Rene Adler's body.
Bremen ran out of steam and were reduced to 10 men when captain Clemens Fritz was sent off with a second booking for a hard challenge in the 80th minute.
He was followed 10 minutes later by substitute Marko Arnautovic who was booked for a foul and then pretended to kick the ball at the referee who sent him off with a second yellow card.
- Sports & Recreation