On their first day of high school, best friends Virgil Fox, Derek Beaugard, and Stephanie Jameson decide to try various activities. As Derek and Stephanie try out for the football and cheerleading teams respectively, Virgil tries to help young genius Charlie Tuttle after the latter interrupts football practice with a homemade rocket-powered vehicle. However, both are publicly humiliated by the jocks. Following this, Derek claims to Virgil that he tried to help the pair while Virgil comes to resent that day.
Three years later, Virgil and Charlie have become outcasts while Derek and Stephanie have become popular and entered a relationship. Amidst this, Charlie designs a time machine, recruits Virgil, and they enlist another outcast Zeke Thompson for his engineering expertise to help build it. During their first test run, the trio travel back in time and convince a local street performer to purchase a winning lottery ticket for them. However, they are forced to return to the present early, leading to the performer keeping their ticket and winning the lottery himself. Due to this, Virgil and Charlie decide to use the time machine to undo their classmates' bullying and embarrassment and recruit Jeannette Pachelewski, a classmate with an unrequited crush on Charlie, to oversee it while the trio are in the past. In the process, she gives them snowsuits to protect them from the time stream's freezing temperatures.
Throughout their adventures, the trio becomes known as the "Snowsuit Guys," despite their desire to be called the "Minutemen," and earn a heroic reputation with their classmates while Vice Principal Tolkan sees them as troublemakers. However, Charlie reveals he previously hacked into NASA's files to complete the time machine. To avoid attracting unwanted attention, Charlie advises Zeke and Virgil to minimize their use of the machine, but Virgil disobeys him to prevent Stephanie from suffering an injury and reveals his identity to her.
After Derek causes a loss at the state championship, Stephanie asks Virgil to help him win. Virgil mends his friendship with them while neglecting Charlie and Zeke. When Stephanie catches Derek cheating on her, he asks Virgil to avert it. Realizing his own feelings for her, Virgil proves reluctant.
Meanwhile, having monitored the Minutemen's activities, the FBI locates and interrogates the trio, causing them to disband over Virgil's selfishness. After consulting with government scientists, Charlie learns that the Minutemen's work damaged the space-time continuum and created a black hole. With hours to act, the trio reunites and ventures into it to repair the damage. Transported back to their first day of high school, Virgil considers stopping himself from meeting Charlie, but Charlie admits he cherishes this day because it was when he got a real friend. Virgil starts having second thoughts and discovers Derek contributed to their humiliation in order to join the football team.