In Fujisawa, Sakuta Azusagawa is in his second year of high school. He greatly enjoys his days with Mai Sakurajima, who for the past 6 months has been both his girlfriend and senior. However, their peaceful lives are interrupted by the appearance of Sakuta's first love, Shoko Makinohara. With this Sakuta encounters two Shokos — one in middle school and the other an adult, the one who first helped him in his memories. Sakuta discovers that the middle school Shoko is suffering from a heart disease that urgently requires heart transplantation to save her life. When both Sakuta and Mai become concerned about the middle school Shoko's grave illness and think of ways to help her, Sakuta eventually figures out the link between his wounds and adult Shoko: adult Shoko comes from the future after a successful heart transplant operation. Shoko's heart donor is Sakuta himself — who Shoko reveals was declared brain dead after a fatal accident on Christmas Eve. It turns out the reason Shoko came back is to save her dear Sakuta's life, but changing the past comes at a price: as Mai also learns about this, history changes as she resolves to intervene and save her beloved Sakuta. As a result, the entire causality has changed — Sakuta lives, but Mai is killed instead and Shoko's heart transplant donor becomes Mai.
Sakuta is in shock and devastated after Mai's death. Unable to bear seeing him like this, adult Shoko helps him one last time by telling him a secret: with her help, he can also return to the past to rewrite history; the ultimate implication being that the adult Shoko disappears forever. Sakuta makes a firm decision and returns to the past to save his love. Saving both Mai and Sakuta implies Shoko becomes sacrificed, but Sakuta refuses to accept such an outcome and together with Mai, they agree to find a way to help the young Shoko who by now is close to death, knowing that saving her means risking the loss of everything that has happened up to then. Nevertheless, the couple vow to find each other and fall in love all over again. Time winds back to the past, when Shoko was in fourth grade. She bravely writes down her future hopes, but this means giving up the memory of meeting both Sakuta and Mai; and that they would likely never meet her. In the end, time returns to the present. New year comes, Sakuta and Mai visit the shrine and pass by a beach, where for the first time they encounter Shoko, now a healthy young girl. Thanks to memory pieces crossing different timelines, they eventually recognize each other.