Shortly after the death of her mother, medical student Nancy Adams (Blake Lively) travels to a secluded beach in Mexico, the same beach her mother visited while she was pregnant with Nancy. Carlos (Oscar Jaenada), a friendly local resident, gives her a ride and drops her off at the beach. Nancy joins two other locals, and the three surf for several hours. Taking a break from surfing, Nancy video-chats with her sister Chloe (Sedona Legge). When she talks to her father (Brett Cullen) in an emotional and strained conversation, it is revealed that her mother’s death caused Nancy to consider dropping out of medical school.
While surfing one last time for the day, Nancy notices the carcass of a large humpback whale nearby. As she rides the last wave back to the beach, a large great white shark bumps her off her surfboard and bites her leg. Nancy climbs onto the whale carcass, but the shark rams it from underneath, forcing her to swim to an isolated rock. She uses her surfboard strap to slow the bleeding on her leg. Later she uses her jewelry to put rudimentary stitches in place to hold her torn flesh together. Nancy is left alone when the unaware locals leave the beach, and she spends the night on the rock with a wounded seagull, whom she names Steven Seagull. The next morning, a drunk local man on the beach steals Nancy’s belongings. While wading out into shallow water to steal Nancy’s surfboard, he is killed by the shark. Several hours later, the two locals Nancy had surfed with the day before, return. They get into the water before Nancy can warn them away, and are also killed by the shark.
One of the local surfers was wearing a GoPro camera on his helmet. When he was attacked by the shark, his helmet had come off and floated to the surface. Nancy later sees the helmet floating in the water. After some struggle she is able to retrieve it and to leave messages for her sister and father as well as information about the shark attack and her location.
With high tide approaching, Nancy realizes the rock will be submerged soon. After sending Steven toward shore on a piece of surfboard, and timing the shark’s circles from the whale carcass to the rock, Nancy swims to a nearby buoy, narrowly avoiding the shark by swimming through a group of jellyfish, which sting both the shark and her. Nancy finds a flare gun on the buoy. She shoots one flare in an unsuccessful attempt to draw the attention of a faraway cargo ship, then another flare at the shark, setting the oil from the whale carcass alight and angering it, but otherwise having no effect. The shark attacks the buoy and rips out the chains securing it to the ocean bed. Nancy straps herself to the last remaining chain and as it is ripped from the buoy, she is pulled down to the ocean floor, pursued by the shark. At the last moment, Nancy pulls out of the dive, and the shark impales itself on some rebar from the buoy’s anchor.
Later, a boy at the beach finds the action camera and informs his father, Carlos. Carlos finds Nancy floating close to shore and revives her. Nancy briefly sees a hallucination of her mother. As she looks around the beach, she sees that Steven has made it to the shore. One year later, Nancy (now a doctor) and Chloe go surfing in Galveston, Texas, as their father tells Nancy that her mother would have been proud.