Macheda has struggled to make an impact at Old Trafford after scoring a famous debut goal against Aston Villa as a 17-year-old that helped secure the Premier League title in 2009.
Loan spells at Sampdoria and Queens Park Rangers have both proved disappointing, and now the Italian is looking to kick-start his career in
"I have followed the Bundesliga and of course I know Stuttgart," Macheda told his new club's website.
"I'm delighted to be able to play for them now. I now have got to get to know my team-mates and settle in, because we have got many interesting games in three competitions to come."
Stuttgart's director of sport
"Federico is young and hungry for success and he therefore fits in very well in
"He comes from a top European club and has already proven himself there. We now want to integrate him as quickly as possible into the team."
Macheda is available to Stuttgart coach
The Italian striker will wear the number 14 shirt for the Bundesliga club.
Borussia Monchengladbach has cemented its goalkeeping options after Christofer Heimeroth signed a new two-year contract.