It took just 15 minutes for Juve to make the breakthrough following a positive start, which resulted in Costa sending the ball into the top right corner after connecting with a rebound.
Torino tried to respond at the other end when the ball was threaded through to M'Baye Niang, who wasted an opportunity to equalise when he hit the ball against the post after getting around the goalkeeper.
Luckily for the goalkeeper, Costa's second goal was flagged offside, which ensured that Torino still had a chance in the game when they returned for the second half.
The optimism did not last long, though, as Mandzukic doubled Juventus's lead by lifting the ball over the top of Milinkovic-Savic, who had come off his line in an attempt to clear the danger.
Dybala came close to making it three goals to the good after picking up the ball from Costa, but his effort glanced just wide of the post.
The hosts managed to see the game out and claim a spot in the final four.
Juventus (4-3-3): Szczesny; Sturaro (Lichtsteiner 46'), Rugani, Chiellini, Asamoah; Marchisio (Khedira 60'), Pjanic, Matuidi; Costa, Mandzukic (Higuain 77'), Dybala
Torino (4-3-3): Milinkovic-Savic; De Silvestri, N'Koulou, Burdisso, Molinaro; Acquah (Boye 81'), Rincon, Baselli (Obi 81'); Falque, Niang (De Luca 81'), Berenguer