 McKellen 's work spans genres ranging from Shakespearean and modern theatre to popular fantasy and science fiction . The BBC states his " performances have guaranteed him a place in the canon of English stage and film actors " . His most well known film roles include Gandalf in The Lord of the Rings and The Hobbit trilogies and Magneto in the X @-@ Men films . 
