Sir Ian McKellen as Gandalf the wizard