One of the reasons The Girl on the Train shot to seemingly instant success was its spectacular, there's-no-way-in-hell-you-ever-saw-that-coming ending (in addition to its fantastic writing, terrifying thrills, and complex characters, of course). Although there are a few minor differences between the novel and its cinematic adaptation, the film mostly stays true to its source material. The twist in both versions is a total punch to the gut, and is precisely why everyone who adored Gone Girl couldn't get enough. Whether you're too much of a wimp to stick it out through Emily Blunt's fantastic performance or you're a little unclear about how it ends, we've laid it all out for you below.
Spoilers for the ending of The Girl on the Train below!
Rachel Watson (Blunt) is an alcoholic and divorcée who commutes to NYC's Grand Central station each day by train, where she becomes obsessed with a seemingly perfect husband and wife — Scott (Luke Evans) and Megan Hipwell (Haley Bennett) — whom she catches glimpses of in their backyard at a certain train stop. Megan is extremely bored in her marriage and takes on a job as a nanny for the baby of her neighbors, Tom (Justin Theroux) and Anna (Rebecca Ferguson). One day Rachel sees Megan kissing another man, flies into a blind, drunken rage, and blacks out. A few days later, she discovers that Megan has gone missing and is possibly dead, and is questioned by the authorities about her whereabouts and what she might know. Given her obsession with the Hipwells (and her decaying mental state), Rachel begins investigating Megan's disappearance on her own, even though she can't quite trust herself due to her alcoholism. It's revealed she lived two doors down from the Hipwells before she got divorced from her ex-husband (Tom!) and moved to a different suburb. Tom is now married to the woman he cheated on Rachel with (Anna) and is constantly being bombarded by Rachel's aggressive drunken calls, texts, and surprise appearances at his home.
During Rachel and Tom's marriage, he had convinced her that her drinking problem had led to instances of physical abuse and an incident at his work party that had gotten him fired. As Rachel gets deeper into the mystery of Megan's disappearance, she discovers that not only has Tom been lying about her behavior the entire time (he was the abusive one, not her), but she pieces together the fact that he's been having an affair with Megan. Tom is the one who killed Megan! She told him he got her pregnant and that she wanted to keep the baby. He then killed her and tried to cover it up by dumping her body in the woods. Unfortunately for Tom, Rachel ran into both of them the night it happened (although she was blackout drunk at the time) and manages to remember it later on. Anna also does a little digging of her own, finds Megan's cell phone in Tom's bag, and realizes Rachel has been right all along. Rachel confronts Anna and Tom about everything, and Tom attacks Rachel before she stabs him in the neck with a corkscrew. Anna and Rachel are then called into the police station, where they cover for each other.