Who knew early-nineteenth-century English country houses could be such hotbeds of sex, gossip, and mathematics? It's 1809 at Sidley Park, and thirteen-year-old Thomasina is learning about more from her tutor Septimus than algebra and Latin. Rest assured, however, this isn't Lolita: Septimus has been sleeping with one Mrs. Chater, wife to the not-so-bright (not to mention poetry-challenged) poet, Ezra Chater. Unfortunately for Septimus and Mrs. Chater, one of their escapades in the gazebo has been spotted by Mr. Noakes, the landscape architect.
Of course, Noakes reports this interesting fact to Mr. Chater, whose note requesting a duel interrupts the conversation Thomasina and Septimus are having about sex, math, time, and free will. Chater wants a duel with Septimus to defend his wife's honor, but Septimus manages to get him to believe that Mrs. Chater slept with Septimus only to ensure that he would write a good review of Mr. Chater's latest poem. Chater is so pleased with this take on the affair that he writes a grateful inscription in Septimus's copy of his book.
Lady Croom enters with the hapless Mr. Noakes and her brother, Captain Brice. Their discussion of the gazebo leads Septimus to think that they, too, are aware of his fling with Mrs. Chater. However, it turns out Lady Croom is more concerned with the fate of her garden, which Mr. Noakes is ripping up to turn into something that looks like a Dracula movie. Noakes has made a series of sketches in a book detailing what he wants the garden to look like. Thomasina makes her own addition to this book: a drawing of a hermit, to go with the proposed hermitage (which is both a place where hermits live and, more generally, a hideaway).
The action shifts to the present day in the same place (the same room, even). Living in the house are: the current Lord and Lady Croom, the latter of whom is still obsessed with gardening, and their children, mathematician Valentine, boy-crazy Chloë, and silent Gus. They also have a visitor, a scholar named Hannah Jarvis, who is doing research for a book about the garden and its hermit.
Bernard Nightingale arrives, looking for Hannah. For some reason, he doesn't want Hannah to know his real name – Chloë introduces him as Mr. Peacock. Hannah does not take kindly to his slightly slimy manner, but she is more or less civil in helping him with his quest: he's trying to find out about poet Ezra Chater. Nightingale has found the book that Chater inscribed to Septimus, which has led Nightingale to Sidley Park.
Hannah also talks about her own research, including her most recent book on Caroline Lamb (one of the English poet Lord Byron's lovers), which was torn apart in the press by Byron scholars – especially one Professor Bernard Nightingale. Hannah's current work takes the Sidley Park mad hermit (as illustrated by Thomasina, but also mentioned elsewhere) as a symbol for the disintegration of eighteenth-century rational Enlightenment ideals into nineteenth-century Romantic excess.
When Chloë slips up with the name game and Hannah discovers "Peacock" is really Nightingale, Hannah is ready to kick him out of the house. But Bernard explains his real aim: he's convinced that Byron killed Chater in a duel at Sidley Park, and he wants to find any evidence that will support his claim. Hannah laughs off this idea, but Bernard is hooked when she mentions that Septimus was at college with Byron.
Back to 1809. Thomasina's lesson for the day is Latin translation, but she's more interested in discussing one of their current houseguests, Lord Byron, and his flirtation with her mother. She's also excited about the new kind of geometry she's trying to figure out: she's bored with the regular shapes Septimus is teaching her, and wants to figure out how to use math to describe the more complex forms of nature. They're interrupted again by Chater, who has discovered, through Byron, that Septimus wrote a snarky review of his last poem. Chater, supported by Captain Brice, challenges Septimus to a duel, and a weary Septimus agrees to a face-off the next morning.
Flip over to the present day. Hannah has some of Thomasina's old math books, and is trying to figure out what the heck the girl was up to. According to Valentine (remember, Lady Croom's son?), what Thomasina was doing is somewhat similar to what Valentine's work trying to describe bird populations mathematically. Bernard interrupts them excitedly because he's found some penciled lines referring to Chater in a copy of a book by Byron in the estate library. Valentine offers another interesting tidbit: Byron is mentioned as a guest in one the gamebooks (records of birds shot by the house's hunting parties) he's using for his research data. Bernard goes off, and the earlier conversation resumes.
Valentine explains that whatever Thomasina was doing, it would never have amounted to a major discovery, because it takes too long doing these kinds of calculations by hand, without a computer – you would have to be crazy to try, which makes Hannah think of the mad hermit.
Intermission! Take a break and have some chocolate or something.
When we return, Bernard reads a newly written lecture about his Byron duel theory to Chloë, Valentine, and Gus. Hannah comes in with something to show Valentine, but ends up staying and objecting to Bernard's speech, pointing out all the gaps and flaws in his argument. When Bernard starts slamming her own book, however, Hannah decides to leave him to his doom. Valentine enters the fray, and he and Bernard argue about which is more trivial: personalities (who discovered what) or scientific knowledge (about things that have no real impact on day-to-day human lives). The Coverlys depart, and Bernard hits on Hannah, but she turns him down. He gives her a book that mentions the hermit, and she discovers that the hermit was born in the same year as Septimus.
We now return you to your previously scheduled nineteenth century. It's early morning, and the butler, Jellaby, opens the door to let in Septimus, who spent the night in the boathouse. The house has been in an uproar: Mr. and Mrs. Chater have departed with Captain Brice, and Lord Byron has also gone off. Jellaby gives Septimus the behind-the-scenes version of events: Lady Croom met Mrs. Chater on the threshold of Lord Byron's room, and all hell broke loose. At that point Lady Croom herself enters, and she is ready to send Septimus away because of his friendship with Byron and affair with Mrs. Chater. But Septimus tells Lady Croom that it's her he really loves, and Mrs. Chater was just a poor stand-in. Lady Croom invites him to her room. (We've got to give him props: this Septimus guy is a quick thinker.)
What's that? Why, it's the present day, popping up again! Except most of the characters are now dressed in Regency-era clothes (think Jane Austen movie outfits) for the evening's costume ball. Chloë is reading the press coverage of Bernard's Byron theory. Valentine uses his computer to expand Thomasina's math beyond what she could do by hand, and shows off the results to Hannah. Hannah reveals Thomasina's fate: she died in a fire in the house on the night before her seventeenth birthday.
The nineteenth century, not to be outdone, intrudes into the scene (1812 this time): Valentine and Hannah remain in the room, but Thomasina and her younger brother Augustus run in and join them. (Neither century notices the other is present.) Thomasina tries to explain her math – the same formulas that Valentine has expanded on his computer – to Septimus, as well as her crush on Lord Byron. Augustus leaves, and Thomasina reminds Septimus of his promise to teach her to waltz. Thomasina's interest turns to the book Septimus is reading, which challenges Newton's theories of physics.
Lady Croom enters the room and admires her dahlias, newly arrived from the French Caribbean island of Martinique, where the Chaters and Brice went after leaving Sidley Park. Mr. Chater died there from a monkey bite, and Mrs. Chater is now Mrs. Brice, making her Lady Croom's sister-in-law. Even though three years have passed, the Sidley Park garden is still under construction, and now Mr. Noakes has enlisted a steam engine to help with the work. Thomasina figures out, however, that the steam engine will never put out as much energy as you have to put into it to make it work. Septimus asks her to write down her explanation of this fact.
The nineteenth century walks out, and the present day walks back in. While Lady Croom was enthusing over her dahlias, Hannah was reading about their arrival in Martinique and the fate of Chater in her garden books. Hannah wastes no time in reporting to Bernard that it wasn't Byron who killed Chater, but rather, a particularly vicious monkey. Bernard is mortified that his public acclaim is going to turn into public mockery, and all exit.
It's now evening in 1812, and Septimus enters to grade Thomasina's homework. Thomasina herself follows him, and kisses him to remind him of his promised waltz lesson. While they wait for the music coming from the piano in the next room to be right for waltzing, they discuss Thomasina's work: Septimus is fascinated by Thomasina's ideas, but does not quite understand them.
In the present day, Hannah and Valentine come in, and Valentine explains Thomasina's diagram of the steam engine to Hannah. In past and present, both couples talk about how we're all doomed because the whole universe is running down like the steam engine, but Thomasina still wants to waltz. Finally the music is the right rhythm, so Septimus begins to teach her the dance. Bernard blows in, breaks up with Chloë, and blows out, followed by Valentine. Hannah remains behind, joined by Gus, who invites her to dance. The present joins the past in waltzing to the end.