In 2035, the crew of the Ares III mission to Mars is exploring Acidalia Planitia on Martian solar day (sol) 18 of their 31-sol expedition. A severe dust storm threatens to topple their Mars Ascent Vehicle (MAV). The mission is scrubbed, but as the crew evacuates, astronaut Mark Watney is struck by debris and lost in the storm. The telemetry from his suit's biomonitor is damaged and Watney is wrongly presumed dead. With the MAV on the verge of toppling, the surviving crew takes off for their orbiting vessel, the Hermes.
Watney awakens after the storm, injured and with a low-oxygen warning. He returns to the crew's surface habitat ("Hab") and treats his wound via self surgery. As Watney recovers, he begins a video diary. Lacking communication with Earth, his only chance of rescue is via the next Mars mission, four years later: the Ares IV will be landing 3,200 kilometers (2,000 mi) away at the Schiaparelli crater. Watney's immediate concern is food; being the mission's botanist, he improvises a garden inside the Hab using Martian soil fertilized with the crew's bio-waste, and manufactures water from leftover rocket fuel. He then plants the crew's unused potatoes. He also begins modifying the rover for the distance trek to the Ares IV landing site.
On Earth, NASA satellite planner Mindy Park, reviewing aerial Hab images, notices moved equipment and realizes Watney is alive. NASA director Teddy Sanders publicly releases the news, though the Ares III crew (still en route to Earth) are not told so that they remained focused on their mission. Sanders overrules Hermes flight director Mitch Henderson, who believes the crew should know.
Watney takes the rover to retrieve the nearby Pathfinder probe, which fell silent in 1997. Using Pathfinder's camera and motor, he establishes rudimentary two-way communication with Earth, first using hand-written signs, and then sending and receiving ASCII in hexadecimal. NASA transmits a software patch to link the rover with Pathfinder and communicate via text. Watney is angry that the Hermes crew is unaware that he is alive, though he does not blame them for leaving him behind. Sanders finally allows Henderson to inform them.
Mars mission director, Vincent Kapoor, and Jet Propulsion Laboratory (JPL) director Bruce Ng prepare an Iris space probe to deliver enough food for Watney to survive until Ares IV's arrival. Meanwhile, the Hab's airlock malfunctions, killing the potato plants and sterilizing the soil. Believing it a low risk, Sanders orders the routine pre-flight safety inspections be bypassed to expedite the probe's launch. The rocket explodes soon after liftoff. Watney now believes his death on Mars is inevitable.
The China National Space Administration has been developing a classified booster rocket, the Taiyang Shen. Feeling camaraderie with NASA's scientists, they sought a way to work around official barriers and offer to repeat the Iris mission. As Watney's situation grows riskier as time passes, JPL astrodynamicist Rich Purnell devises an alternative plan: have the Taiyang Shen rendezvous with and resupply the Hermes, which will then use Earth's gravity to "slingshot" back to Mars two years earlier than Ares IV. Sanders rejects the idea, considering it too risky for the Hermes crew. Henderson surreptitiously sends Purnell's plan to the crew; they unanimously vote to implement it, disabling NASA's remote controls and making the course change. Powerless to stop them, NASA concedes the issue.
Watney begins the 90-sol journey to Schiaparelli, where the MAV for Ares IV has been pre-positioned. The MAV needs to be lightened to intercept with Hermes on its new course. Watney removes many components, and replaces the nose cone with canvas. After takeoff, the MAV fails to reach the required speed. Commander Lewis maneuvers the Hermes to decelerate by using the spacecraft's RCS system. She also orders a directional explosive decompression of the internal atmosphere to better align the ship. In a Manned Maneuvering Unit, Lewis is unable to reach Watney when the tether falls short. Watney pierces his pressure suit, using the escaping air to propel himself to Lewis. He and the crew are reunited after Mark's 560 sols alone on Mars.
After returning to Earth, Watney becomes a survival instructor for astronaut candidates. Five years later, as the Ares V (commanded by Martinez) is about to launch, those involved in Watney's rescue are seen in their current lives.
Matt Damon as Mark Watney, a botanist who is part of the Ares III team.
Jessica Chastain as Commander Melissa Lewis, geologist and the Ares III mission commander.
Kristen Wiig as Annie Montrose, the director of media relations for NASA.
Jeff Daniels as Theodore "Teddy" Sanders, the Director of NASA.
Michael Peña as Major Rick Martinez, pilot of the Ares III mission.
Sean Bean as Mitch Henderson, the Hermes flight director.
Kate Mara as Beth Johanssen, the Ares III's system operator.
Sebastian Stan as Dr. Chris Beck, flight surgeon for the Ares III mission.
Aksel Hennie as Dr. Alex Vogel, a German national who is the navigator and chemist of Ares III.
Mackenzie Davis as Mindy Park, a satellite planner in Mission Control.
Benedict Wong as Bruce Ng, director of Jet Propulsion Laboratory (JPL).
Donald Glover as Rich Purnell, a JPL astrodynamicist.
Chen Shu as Zhu Tao (Chinese: 朱涛), deputy chief scientist at the China National Space Administration.
Eddy Ko as Guo Ming (Chinese: 郭明), chief scientist at the China National Space Administration.
Chiwetel Ejiofor as Vincent Kapoor, NASA's Director of Mars Missions
adapted screenplay from The Martian, a 2011 novel by Andy Weir.
Chastain prepared for her role by meeting with astronauts and scientists at the Jet Propulsion Laboratory and the Lyndon B. Johnson Space Center. She was inspired by astronaut Tracy Caldwell Dyson, saying "She's very matter of fact, very straightforward. My character is dealing with the guilt of leaving a crew member behind, but she's still responsible for the lives of five other crew mates. I tried to play her as Tracy would have been in those moments." Damon prepared for the role by a different method than Chastain. He explained, "For me the rehearsal process was sitting with Ridley and going kind of line-by-line and moment-by-moment through the script and playing out a plan of attack for what we wanted each scene to accomplish."
The Media Action Network for Asian-Americans (MANAA) criticized the casting of white actor Mackenzie Davis as Mindy Park who it said was described by author Andy Weir as Korean-American. The group also criticized the casting of Chiwetel Ejiofor as Vincent Kapoor, who the MANAA said Weir described as an Asian Indian character. In the novel, the character's name was Venkat Kapoor, and he identifies religiously as a Hindu (a Baptist and a Hindu in the film). The group called the casting whitewashing and said that Asian actors, being under-represented in Hollywood, were deprived of acting opportunities. Weir said in October 2015 he perceived Mindy Park as Korean but said he did not explicitly write her as Korean. He also dismissed criticism of Ejiofor's casting as Kapoor, "[Kapoor]'s an American. Americans come from lots of different sources. You can be Venkat Kapoor and black." In the original novel, Weir intentionally avoided including the physical descriptions of his characters.
Naomi Scott was cast as Ryoko, a member of the JPL team. She filmed her scenes but they were removed from the final cut.