Colin Singleton and his friend Hassan Harbish decide to travel from Chicago to Tennessee after Singleton's recent breakup sends him spiraling into feelings of frustration and disappointment. Singleton is a child prodigy, especially talented in mathematics, and has dated 19 girls all named Katherine, spelled Katherine, but still, after 19 times cannot figure out the key to successful relationships.
Colin, in search of his "eureka" moment meets Lindsey Lee Wells at the supposed tomb of Archduke Franz Ferdinand. Singleton and Harbish agree to work in Lindsey's mother's factory, which produces tampon strings, and decide to live with Lindsey and her mother, Hollis, in Gutshot, Tennessee. Hollis decides to use their employment to construct a narrative of Gutshot's history by interviewing all the adults in the town.
Lindsey is in an on-and-off relationship with another boy named Colin, who is caught cheating on Lindsey with Hassan's new girlfriend, Katrina, ending Lindsey's relationship with TOC, "The Other Colin," for good. In the fallout, Colin realizes that the grave is not Franz Ferdinand, but is instead Lindsey's great-grandfather, Fred N. Dinzanfar.
Colin and Lindsey find themselves in Lindsey's hide-out, a small cave, and Colin teaches Lindsey about his failed relationships with girls all named Katherine. Lindsey confesses to being narcissistic, and the two talk about life and meaning and love, eventually confiding in each other that they each love the other. Colin and Lindsey's relationship surpasses the limit his mathematic relationship-graph had predicted and Colin discovers that it is not his uniqueness that gives him meaning. It's the connections he builds with other people. This is his "eureka" moment and he realizes that he is not doomed to be special and alone after all.