Atletico boss Diego Simeone hinted on Tuesday that the Croatia international could leave after claiming the club would decide the player's future rather than him.
The Champions League runners-up have moved quickly to fill the expected void by agreeing a basic €15m fee, with a further €3m in add-ons.
Juve have also agreed personal terms with Mandzukic, who will earn €3.5m a year after tax with an option to extend the deal by an extra 12 months until June 2019.
All that is left to finalise the move is for the former Bayern Munich attacker to complete a medical, which he is expected to do early next week.
The Bianconeri have already spent €32m on Paulo Dybala from Palermo, while Sami Khedira has joined the club on a free transfer after leaving Real Madrid.