Spider-Man 3 is a 2007 American superhero film based on the Marvel Comics character Spider-Man. It was directed by Sam Raimi from a screenplay by Raimi, his older brother Ivan and Alvin Sargent. It is the final installment in Raimi's Spider-Man trilogy, and the sequel to Spider-Man (2002) and Spider-Man 2 (2004). The film stars Tobey Maguire as Peter Parker / Spider-Man, alongside Kirsten Dunst, James Franco, Thomas Haden Church, Topher Grace, Bryce Dallas Howard, James Cromwell, Rosemary Harris, and J. K. Simmons. The film also marks the final film appearance of Cliff Robertson before his retirement and death in 2011. Set a year after the events of Spider-Man 2, the film follows Peter Parker as he prepares for his future with Mary Jane Watson, while facing three new villains: Uncle Ben's true killer, Flint Marko, who becomes Sandman after a freak accident; Harry Osborn, his former friend, who is now aware of Peter's identity and seeks to avenge his father; and Eddie Brock, a rival photographer who subsequently transforms into Venom. Peter also faces his greatest challenge when he bonds with an extraterrestrial symbiote that increases his abilities but amplifies his anger and other negative traits.
Development of Spider-Man 3 began immediately after the successful release of Spider-Man 2 for a 2007 release. During pre-production, Raimi originally wanted two villains, Harry Osborn and Sandman. At the request of producer Avi Arad, he added Venom to the list and the producers also requested the addition of Gwen Stacy. Principal photography for the film began in January 2006, and took place in Los Angeles and Cleveland before moving to New York City from May until July 2006. Additional pick-up shots were made after August and the film wrapped in October 2006. During post-production, Sony Pictures Imageworks created over 900 visual effects shots. With an estimated production budget of $258–350 million, it was the most expensive film ever made at the time of its release.
Spider-Man 3 premiered on April 16, 2007, in Tokyo, and was released in the United States in both conventional and IMAX theaters on May 4, 2007. The film grossed $894.9 million worldwide, making it the highest-grossing film of the trilogy, the third-highest-grossing film of 2007 and was the highest-grossing Spider-Man film until it was surpassed by Spider-Man: Far From Home in 2019. Unlike the previous installments, Spider-Man 3 received mixed reviews from critics, who praised the action sequences and visual effects, but were polarized over the plot and pacing, while also criticizing the film's runtime and number of villains, most notably Venom. The perceived overcrowded narrative was later attributed to studio interference and creative differences between Sony, Raimi, and Arad. A revised version of the film called Spider-Man 3: Editor's Cut was released on home entertainment and digital download on June 13, 2017.