The Hobbit actor claimed that JRR Tolkien's wizard would come out on top in a battle with Marvel Comics' mutant master of magnetism.
[Left: McKellen as Gandalf / Right: McKellen as Magneto]
McKellen was asked whether he was ever tempted to use Magneto's powers to steal orcs' weapons while playing Gandalf during an interview on the Colbert Report.
"No, see, because you know Gandalf is more powerful than Magneto," he said.
When asked if Gandalf would win in a fight, he said: "Yes, every time. The old guy will do it every time. He's seven thousand years old. He knows it all."
McKellen will reprise his role as Gandalf in The Hobbit: An Unexpected Journey, which debuts on December 14.
The Colbert Report is running a week-long tribute to the film.
He was recently confirmed to be returning to the role of Magneto for X-Men: Days of Future Past.
Watch a trailer for The Hobbit: An Unexpected Journey below: