Cal Weaver (Steve Carell) is a middle-aged man who learns that his wife Emily (Julianne Moore) cheated on him with a co-worker, David Lindhagen (Kevin Bacon), and that she wants a divorce. After moving into his own apartment, Cal goes to a bar night after night, talking loudly about his divorce, until he attracts the attention of a young man named Jacob Palmer (Ryan Gosling) who is a womanizer who beds women each night, although a young woman named Hannah (Emma Stone) recently had rejected his advances. Jacob takes pity on Cal, and offers to teach him how to pick up women. Using Jacob's teachings, Cal seduces Kate (Marisa Tomei) at the bar. After this encounter, Cal manages to successfully seduce other women in the bar. He sees Emily again at their son Robbie's (Jonah Bobo) parent-teacher conference. The interaction goes well until they discover that Robbie's teacher is Kate, who reveals to Emily that she and Cal slept together. Cal then confesses to sleeping with many women. Emily leaves in disgust and begins actively dating David. Meanwhile, Hannah, a recent law school graduate, is expecting her boyfriend, Richard (Josh Groban) to propose marriage while they celebrate her passing the bar exam, but he does not, which hurts Hannah's feelings. Hannah returns to the bar where she originally rejected Jacob's advances and kisses Jacob passionately. The two return to Jacob's home to have sex, but end up talking to each other all night and making a connection. Jacob starts a relationship with Hannah, and he becomes distant from Cal.
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), who actually has a crush on Cal. On the advice of her classmate Madison (Julianna Guill), she takes naked photos of herself to send to Cal and tucks them away in an envelope inside her dresser drawer. Later, when Emily calls Cal under the guise of needing help with the house's pilot light, Cal decides to try and win her back. Meanwhile, Jacob returns Cal's calls and asks for advice about starting a real relationship. Jessica's mother, Claire (Beth Littleford) discovers Jessica's naked photos addressed to Cal in her drawer and shows them to Jessica's father, Bernie (John Carroll Lynch). He rushes to the Weaver residence to confront him about the photos. 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, and Hannah is revealed to be Cal and Emily's first daughter. Cal is appalled that Jacob is dating his daughter, and forbids her to see him. At that moment, Bernie shows up and attacks Cal. Jessica arrives and tells her father that Cal knew nothing of the pictures. Then David arrives on the scene to return Emily's sweater from a previous date. Cal, Jacob, David, and Bernie then get into a scuffle which is soon broken up by the police. 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 refuses to approve of their relationship. Jacob harbors no ill feelings, but rather respects him and praises him for being a great father.
At Robbie's eighth grade graduation, Robbie is the Salutatorian and gives a pessimistic speech about how he no longer believes in true love and soul-mates. 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 the audience's applause. After the ceremony, Cal gives Jacob and Hannah his blessing. Jessica gives Robbie an envelope containing the 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.