Celtic, Rangers progress to fifth round
Stokes had an effort ruled out for offside on the stroke of half-time before grabbing his second with a superb strike in the 57th minute.
The Republic of Ireland international completed his hat-trick in the 82nd minute when he lashed home a pass from Scott Brown to seal a comfortable win.
"The football was good and we should have won the game more comfortably," Celtic manager Neil Lennon said. "But I have no complaints about the application of the players and the important thing is we are in the draw for the next round."
Rangers booked their place in the fifth round with a comprehensive 4-0 victory over Arbroath at Gayfield. The Second Division side twice had chances to take the lead before Rangers striker David Healy opened the scoring in the 17th minute.
The Gers soon doubled their lead four minutes later through a Craig Wedderburn own goal. Arbroath had a penalty claim turned down at the start of the second half before strikes from Nikica Jelavic and substitute Salim Kerkar made sure of their progression to the next round.
"In the opening five or ten minutes we were a little bit nervy but apart from that I think we were comfortable," said Rangers manager Ally McCoist. "We got the goals at good times and ran out deserved winners."