Cal Weaver (Steve Carell) gets the surprise of his life when he learns that his wife Emily (Julianne Moore) cheated on him with a coworker, David Lindhagen (Kevin Bacon), and wants a divorce. After moving into his own apartment, Cal begins frequenting a bar night after night, talking loudly about his divorce, until he attracts the attention of a young man named Jacob Palmer (Ryan Gosling). Jacob is a womanizer who successfully beds women each night, although a young woman named Hannah (Emma Stone) recently rejected his advances. Taking pity on Cal, Jacob agrees to teach him how to pick up women. Jacob takes Cal shopping, outfitting him with an entirely new wardrobe and begins teaching him the art of seduction. As they spend their evenings at the bar together, a friendship begins to blossom.
On Cal's first attempt to seduce a woman he meets a teacher named Kate (Marisa Tomei). She initially rejects his awkward advances, but eventually they sleep together at his apartment. In the following weeks, Cal manages to successfully seduce multiple women, although he remains troubled by his crumbling marriage. He only sees Emily again at a parent teacher conference at his 13 year-old son Robbie's (Jonah Bobo) school. They almost reconcile but the teacher they are meeting with turns out to be Kate, and Emily learns of Cal's recent womanizing. She leaves in disgust and begins dating David.
Meanwhile, Hannah, a law student, is about to take the bar exam and is expecting a marriage proposal from her boyfriend, Richard (Josh Groban). Hannah's best friend, Liz (Liza Lapira), doesn't think she is happy with Richard and thinks she should have hooked up with Jacob the night the two met. After Hannah passes the bar exam, Richard does not propose, but instead extends a job offer at his law firm, leaving Hannah hurt and disappointed. Hannah storms from the restaurant and returns to the bar where she originally rejected Jacob's advances. Upon finding Jacob at the bar, Hannah pulls his attention from another young woman and embraces him in a passionate kiss. The two return to Jacob's home and plan to have sex, but end up staying awake all night talking about themselves. Jacob soon starts a relationship with Hannah, and as a result of the amount of time they spend together, ends up distancing himself from Cal. Cal, not understanding why Jacob is avoiding his phone calls, slips back into a lonely and depressive state.
At the same time, Robbie makes numerous grand gestures to try to win the heart of his 17-year-old babysitter, Jessica Riley (Analeigh Tipton). Robbie tells Cal that he believes Jessica is his soulmate just like he believes Emily is Cal's soulmate. Unfortunately, Jessica is not only repulsed by Robbie's advances, but also harbors a crush on Cal. After learning of Cal's womanizing, Jessica, on the advice of a classmate, takes naked photos of herself to send to Cal and tucks them away in an envelope inside her dresser drawer.
Later, when Cal is maintaining the backyard of the house at night, which he has been secretly doing since the divorce, he sees Emily making a call to him through the window, asking him for help relighting the pilot light of the furnace. Seeing that she is nowhere near the furnace and that the call was a pretense to talk to him, Cal decides to try win her back.
Meanwhile, as Jacob and Hannah peruse the aisles of a store, Jacob finally decides to return Cal's calls and apologizes for being unreachable. He tells Cal that he needs advice because he thinks he is falling for a girl (Hannah) and that he is on the way to meet her mother. Cal reassures Jacob, telling him to just be himself, and gets off the phone, pleased that Jacob finally called back and that he was able to give Jacob some advice rather than the other way around.
In preparation for winning his wife back, Cal and his kids create a makeshift mini golf set in their backyard to remind Emily of their first date. During the gathering, Jacob and Hannah show up at the house unexpectedly and Hannah is revealed to be Cal and Emily's daughter. At that moment, Jessica's father, Bernie (John Carroll Lynch), shows up and attacks Cal, having seen the naked pictures of Jessica in the envelope addressed to Cal. Jessica arrives and desperately tries to stop her father's attacks, telling him that Cal knew nothing of the pictures. Robbie gets upset that Cal is Jessica's secret crush. David also arrives to return Emily's jacket from a previous date. Jacob responds by attacking David for stealing Emily away from Cal. Cal, Jacob, David, and Bernie then get into a scuffle which is soon broken up by the police, after which Cal leaves everyone in frustration.
Cal starts spending his time at the bar again and receives a visit from Jacob, who confesses that he is in love with Hannah. Cal, however, cannot approve of their relationship because he has seen Jacob's womanizing ways.
At Robbie's eighth grade graduation, Robbie is the Salutatorian and gives a speech about how he no longer believes in true love and soulmates. Cal stops him and instead begins to recount his courtship with Emily to the audience, saying that, while he doesn't know if things will work out, he will never give up on Emily. With renewed faith, Robbie reaffirms his love for Jessica to audience applause. After the ceremony, Cal finally approves of Jacob and Hannah's relationship. Jessica, flattered by Robbie's declaration of love, gives him an envelope containing the nude photos of herself to "get him through high school." Cal and Emily have a laugh talking about the events that have transpired the past year, as Robbie looks on at them and grins.