Lily Hopper is a senior at the Ames School, a prestigious boarding school on the Rhode Island coast. As a "fac brat," a faculty member's child, she has lived on campus her entire life with her mother, Leda Hopper, the school's beloved English teacher. Leda's boyfriend, Josh Bauer, runs the Hub, the student center diner. With 12 days until graduation, Lily has been named salutatorian.
Lily's emotional life revolves around Tag Swell, her ex-boyfriend. They dated for nearly two years before breaking up the previous April. Tag, a star swimmer bound for the University of Virginia, has been in an on-and-off relationship with Blair Greenberg, the school's valedictorian, though they have just broken up again. Meanwhile, Daniel Rivera, the student council president, has promposed to Lily with a bouquet of lilies, to which she is allergic, and she accepted out of obligation.
Students speculate about the annual senior prank, orchestrated by an anonymous figure called "the Jester." Lily discovers a black envelope in her mailbox, made from cut-out magazine letters, inviting her to join the Jester's crew. Assuming her friend Alex Nguyen is behind it, she emails her acceptance. Through playful exchanges, however, she realizes the Jester is Tag. She tests her hunch by writing "I hate you," a phrase she always said to him. He replies with his old comeback: "I don't believe you. Because you've got my favorite smile on your face."
Tag's instructions arrive: Meet at King's Court, the courtyard outside the school chapel, by midnight. Wear all black. Bring Leda's faculty keys and master ID card. Lily realizes this is why she was recruited. While Leda is out, Lily swaps lanyards and, after her mother goes to bed, slips out the back door.
At King's Court, Tag wears a jingling jester's hat. The crew assembles: Alex; Zoe Wright, the basketball captain; Zoe's girlfriend Maya Rivera, Daniel's fraternal twin; and Manik Patel, editor of the Almanac, the school yearbook, and Daniel's roommate. Each recruit resents Daniel: Manik does the yearbook work Daniel takes credit for, and Maya wants to humble her brother.
Tag reveals the plan: Steal all 30 boxes of Almanacs, hide them in a storage room behind the Hub, and plant seven scavenger hunt clues across campus for Daniel to follow. Using Leda's ID, Lily swipes the crew into Hubbard Hall, and they move the boxes. Maya's illness sidelines her and Zoe, reducing the active crew to four.
At the Galloway Observatory, Lily and Tag army crawl past their Latin teacher's cottage to tape a clue beneath a telescope. The teacher catches them on the way back, but Lily takes Tag's hand so they appear to be a reunited couple. In the woods, Alex tells Lily that Blair is "a box of Band-Aids" covering the wound Lily left. Six freshmen occupy the sculpture sanctuary, so Alex stays to distract them while Lily climbs onto Tag's shoulders to hide a clue atop a glass sculpture.
At the ropes course, the next clue must go in a tree house 15 feet off the ground, forcing Lily to confront her fear of heights. This is where she and Tag first met during freshman orientation, both too afraid to climb. Tag calms her by playing a trivia game from below. When she asks what scares him, he answers: "Never talking to you again." He admits he recruited her not for the keys but because he missed her. Daniel appears nearby, searching for the freshmen who snuck out, and Tag and Lily hide behind trees until he passes.
At the boathouse, Tag reveals why he targeted Daniel. During a sailing practice, Daniel knocked Tag overboard knowing his insulin pump was not waterproof, watched him struggle, then dismissed him as "dramatic." The incident destroyed Tag's pump and cost him a recommendation for prefect, a student leadership position. Overwhelmed, Tag confesses he procrastinated the prank for months because nothing seemed worth it without Lily. They kiss passionately but pull apart, short on time.
Tag's blood sugar drops dangerously. Lily retrieves food from her house, but Tag, distracted, administers too much insulin. By the time they reach the Admissions building to hide the final clue, he is trembling with a hypoglycemic crash. Alex, who arrived earlier, helps Lily find a juice box in Tag's backpack. When Tag cannot walk, Lily sends Alex to hide and wraps her arms around Tag as Campus Safety, the school's security force known as Campo, arrives. A guard whose sister has diabetes takes charge and brings Tag to the infirmary, where the nurse stabilizes him.
At a disciplinary hearing the next morning, Lily tells administrators she and Tag snuck out for a nostalgic walk, concealing the prank. Headmaster Penny Bickford does not issue Lily a strike, a formal disciplinary mark, but bans her from prom, removes her as salutatorian, and assigns detention. Leda advocates for Tag in a separate hearing after his parents prove unhelpful and his housemaster, the faculty head of his dorm, fails to defend him. She proposes house arrest instead of expulsion: Tag keeps his diploma and scholarship but must stay in his dorm each evening, barred from prom, senior dinner, and graduation.
When Lily tells Daniel she can no longer be his prom date, he responds with contempt, and his narcissism erases any guilt she feels about the prank. The cover story proves useful: If the school believes Lily and Tag were together all night, neither can be suspected as the Jester. When Manik ensures Daniel discovers the missing Almanacs, Tag fires off the Jester's first taunting email. Daniel pushes for room inspections, which Josh uses his faculty authority to block.
During Tag's house arrest, Lily visits him at his dorm window for the honest conversations they avoided for over a year. Lily explains that Tag's sudden popularity with other girls made her insecure, and that Blair befriended them both to position herself as Tag's next girlfriend. Lily pushed Tag away to protect herself before he could leave her. Tag admits he was oblivious and never pursued Blair until after the breakup. Lily tells him she is genuinely in love with him, and Tag reciprocates: She has always been the one.
Lily plants the scavenger hunt's first clue in Daniel's mailbox and confesses the full prank to her mother, who is furious about the safety risks but awed. Daniel follows the clues through a rainy night and recovers the yearbooks. When the Almanacs are distributed, Lily congratulates Blair on being valedictorian, and they share a moment of unspoken understanding.
On prom night, Lily realizes Tag's housemaster is chaperoning the dance, leaving him unsupervised. She tells Bickford, who grants implicit permission for Tag to be free until midnight. Wearing her gold dress from freshman formal, Lily picks Tag up in a golf cart and drives to the sculpture sanctuary, which she has decorated with lights and a table for two. They eat Chinese takeout, dance to "Sixteen Going on Seventeen" from
The Sound of Music, race into the ocean, and retreat to Lily's empty house.
Before midnight, they return to the mail room. Tag retrieves a joker card from his mailbox, the token designating each new Jester, and reveals a queen card in Lily's, acknowledging her role. He slides the joker into the mailbox of Anthony DeLuca, a junior fac brat, selecting him as the next Jester. Walking back under the stars, Lily initiates a game of tag, kissing him and running. He catches her within seconds. "You are," he murmurs, pulling her close and affirming that she is "it" in every sense of the word.