Colin Singleton, a child prodigy, fears he will not maintain his genius as an adult. Over the span of his life, Colin has dated nineteen girls named Katherine, all spelled in that manner. After being dumped by his girlfriend, Katherine XIX, Colin is longing to feel whole, and longing to matter. He hopes to become a genius by having a "eureka" moment.
After graduating from high school, and before college, Colin's best and only friend, Hassan Harbish, convinces him to go on a road trip to take his mind off the breakup. Colin goes, hoping to find his "eureka" moment. After driving from Chicago to Tennessee, they visit the supposed resting place of Archduke Franz Ferdinand. There, they meet Lindsey Lee Wells. After a short time, Colin and Hassan find themselves employed by Hollis, Lindsey's mother who runs a local factory producing tampon strings. They live with their employer and her daughter in a rural town called Gutshot, Tennessee. Hollis employs them to interview all current adult residents of Gutshot and assemble an oral history of the town.
Colin begins to like Lindsey, though he is foiled by her boyfriend, Colin (he and Hassan call him TOC, "the other Colin"). Colin is still chasing his eureka moment, finally finding it in his theorem he created called the Theorem of Underlying Katherine Predictability. The theorem determines the curve of any relationship based on several factors of the personalities of the two people in a relationship. His theorem eventually works for all but one of his past relationships with a Katherine—which the novel explores.
While the back stories of Colin’s life play out, Hassan gets a girlfriend, Katrina, a friend of Lindsey’s. The relationship is cut short when Colin and Hassan catch Katrina having sex with TOC while on a feral hog hunt with Lindsey, her friends and Colin's father. A fight between TOC and all of the surrounding acquaintances begins when Lindsey finds out that he’s been cheating on her. While injured in the fight, Colin anagrams the Archduke's name while in the grave yard to dull the pain, and realizes that it is actually Lindsey's great-grandfather, named Fred N. Dinzanfar, that is buried in the tomb.
Colin finds Lindsey at her secret hideout in a cave, where he tells her the story of every Katherine he has ever loved. Lindsey tells him how she does not feel sad but instead slightly relieved by TOC's affair. They discuss what it means to them to "matter" and eventually confess their love for each other. As their relationship continues, Colin decides to use his dating formula to determine whether or not he and Lindsey will last. The graph reveals that they will only last for four more days. Lindsey then slips a note under his door, four days later, stating that she cannot be his girlfriend because she is in love with Hassan. But she leaves a P.S. stating that she is joking. Colin realizes that his theorem cannot predict the future of a relationship; it can only shed light on why a relationship failed. Despite this, Colin is content with not "mattering". Hassan also states that he is applying for two college classes, which Colin has been trying to convince him to do throughout the book. The story ends with the trio driving past the restaurant they were originally planning on going to, because Colin, Lindsey, and Hassan realize that they can just keep driving; there is nothing stopping them from continuing on.