Five medical students, obsessed by what lies beyond the confines of life, embark on a daring experiment: by stopping their hearts for short periods, each triggers a near-death experience - giving them a firsthand account of the afterlife.
A medical student, Courtney, is obsessed with the idea of the afterlife, wanting to find out what happens after death. She invites fellow students Jamie and Sophia to join her in an experiment, in an unused hospital room: using defibrillation to stop her heart for sixty seconds whilst recording her brain, and then reviving her. She assures them they would not be held responsible for any accidents. Sophia is against this, but Jamie does it anyway. After sixty seconds, they panic as they are unable to revive her, but eventually manage to with the help of fellow student Ray. Later, Marlo, a rival of Ray, arrives and learns of the experiment..
- The film opens with Courtney Holmes (Ellen Page) driving with her younger sister Tessa (Madison Brydges). When Courtney is momentarily distracted, she hits a truck and swerves off a bridge and into the lake, causing Tessa to drown.
Nine years later, Courtney is a medical student. She is examining a patient who asks her if she lost someone. We also meet her colleagues Marlo (Nina Dobrev) and Ray (Diego Luna), who are handling a patient that was just in an accident.
Courtney is in the library doing research on the afterlife. She hears another student, Sophia (Kiersey Clemons), crying from being overwhelmed by her work, as well as pressure she gets from her mother. Courtney talks friendly to her and hangs out with her outside the library.
The students are listening to a lecture from Dr. Barry Wolfson (Kiefer Sutherland) and get chewed out for not knowing what he expects them to know.
During lunch, Courtney finds her colleague Jamie (James Norton) and invites him to join her in the basement later. He follows and finds Courtney there with Sophia. Courtney tells the two that she wants to perform an experiment to document what happens to someone after they die, so she asks that they use a defibrillator to stop her heart for sixty seconds and document her brain activity. Jamie and Sophia do so, and Courtney experiences a surreal out-of-body moment in which she finds herself on the roof of the hospital where she had never been. After sixty seconds, Jamie and Sophia are unable to revive Courtney immediately and they begin to panic. Ray finds them and helps them revive her.
With Marlo, the gang sees the scan of Courtney's brain to see that her hippo campus and amicable appear enhanced.
The next day, Courtney brings bread to class using an old recipe from her grandmother. She even answers questions in Wolfson's class that the other students couldn't have guessed, to Wolfson's own surprise. Later, Courtney manages to play a piano piece perfectly. The others determine that her flatlining has enhanced her capabilities. However, when Courtney is alone, she sees a vision of someone in her tub, frightening her.
Jamie decides to flatline next for two minutes. He sees himself riding his motorcycle through the city with his ex-girlfriend Alicia (Anna Arden), before she disappears in the darkness. After Jamie comes back, the gang has a party where Courtney and Jamie kiss. Courtney later asks Jamie if he felt or saw anything unusual after coming back to life, but he denies it.
At the hospital, Jamie saves a patient's life by giving her medicine that the other doctors hadn't thought to give her. He also starts to see visions of Alicia staring at him menacingly.
Marlo goes next to flatline for three minutes. She finds herself playing the violin and swimming and sees "MURDERER" written in blood at the bottom of the pool, surrounded by jellyfish. They bring her back, and Sophia arrives late after being held up by her mother. Despite Ray's insistence that they stop these experiments, Sophia demands to go next. During her flatline, she sees herself in a classroom where she posts nude photos of her classmate, Irina (Jenny Raven), humiliating her in front of the whole class. After bringing Sophia back, the gang rushes out when security guards come after them, but they manage to escape the parking lot.
The gang later goes to a rave. Courtney sees Tessa's body in a car filled with water before she's snapped out of it. In an extended flashback, we see that Courtney was on her phone while driving, which caused her accident that killed Tessa. After that, Sophia takes Jamie to her apartment and they start to have sex as her mother listens. Sophia then tells her mom that she's planning to move out and that she can't stop her.
Ray escorts Marlo home. She talks to him about a patient she had named Cyrus (Miguel Anthony) that suffered a jellyfish sting to the face. She gave him the wrong combination of medicine and it killed him. The guilt has haunted her ever since. Ray consoles her and they start to hook up.
Jamie is in his boat and hears what sounds like a baby crying. He opens up the space where he hears the crying, but there's nothing there. He then gets a call from Courtney, who says she saw her sister and is now freaking out. She asks Jamie to come to her apartment.
Courtney makes a video explaining that she never did the experiment for science. She becomes terrified as she feels she is hearing noises. Courtney sees Tessa again and she runs to the fire escape. Tessa appears again, causing Courtney to fall to her death.
Courtney's friends learn about what happened the next day. Wolfson asks if they knew if something was wrong with her, but they deny knowing anything, worried that their experiment will get them expelled.
Marlo later goes to the morgue to retrieve Courtney's phone. She opens up the drawer with her body in it and looks at her sadly.
Jamie is once again haunted by the vision of Alicia, to the point where she stabs his hand. Sophia also sees a vision of her being taunted for having loud sex with Jamie.
The four watch Courtney's video and hear her screaming moments before her death. They then come clean to what they had done in the past. Jamie admits to abandoning Alicia when she got pregnant because he got scared. Sophia confesses that she was jealous of Irina having a higher GPA, so she hacked her computer and sent out the photos to ruin her life.
Jamie and Sophia set out to make amends with those that they wrong. Sophia manages to find Irina and admits to her what she did and apologizes to her. Irina is hesitant, but she forgives Sophia. Later, Jamie goes to find Alicia and meets their son for the first time. He tries to apologize, but she won't listen to him.
Ray and Marlo get into an argument when he finds out she changed Cyrus's cause of death to avoid facing her mistake. Marlo drives away and is attacked by a vision of Cyrus trying to suffocate her with a plastic bag, causing her to nearly hit restaurant patrons.
Ray, Jamie, and Sophia frantically try to find Marlo after they fail to get in touch with her. Ray finds her car in the hospital parking garage and realizes where she is. The three rush to the basement to find that Marlo has already flatlined herself. She tries to find Cyrus and ask for forgiveness, but Cyrus attacks her. Marlo's friends try to revive her but she won't wake up. Ray grabs a needle and injects adrenaline into her heart. Marlo starts to get pulled back to life when she sees Courtney telling her she needs to forgive herself. Marlo then wakes up.
The four give up on flatlining for good, throwing away the evidence in a laptop into the ocean. Jamie resolves to stay in the area to be near Alicia and their son. The friends go to a restaurant where they hear the piano piece that Courtney played. They then drink to her memory.