Ted Kramer (Dustin Hoffman), a workaholic advertising executive, is just given his agency's biggest new account. After spending the evening chatting with his boss about handling a new and very large account, he returns home to find his wife Joanna (Meryl Streep) in the process of leaving him.
Ted is left to raise their son Billy (Justin Henry) by himself. Ted and Billy begin to resent each other as Ted no longer has time to carry his increased workload, and Billy misses the love and attention he received from his mother. After many months of unrest, Ted and Billy begin to cope with the situation and eventually grow to love and care for one another.
Ted befriends his neighbor Margaret (Jane Alexander), who initially had counseled Joanna to leave Ted. Margaret is a fellow single parent and the two become kindred spirits. One day as the two sit in the park watching their children play, Billy falls off the jungle gym and severely cuts his face. Picking him up, Ted sprints several blocks through oncoming traffic to the hospital, where he comforts his son tenderly, representing his increased emotional connection and sense of responsibility for the child since his wife left.
Fifteen months after she walked out, Joanna returns to New York in order to claim Billy, and a custody battle ensues. During the custody hearing, both Ted and Joanna are unprepared for the brutal character assassinations that their lawyers unleash on the other. For instance, Margaret is forced to confess that she advised Joanna to leave Ted if she was as unhappy as she professed, although she also attempts to tell Joanna on the stand that her husband has profoundly changed. Eventually, the damaging facts that Ted was fired because of his conflicting responsibilities with his son, forcing him to take a lower-paid job, come out in court, as do the details of Billy's accident.
Finally, the court awards custody to Joanna, not so much due to the evidence on both sides but due to the assumption that a child is best raised by their mother. Ted discusses appealing the case, but his lawyer warns that Billy himself would have to take the stand in the resulting trial and Ted cannot bear the thought of submitting his child to such an ordeal. He therefore decides not to contest custody.
On the morning that Billy is to move in with Joanna, Ted and Billy make breakfast together, mirroring the meal that Ted tried to cook the first morning after Joanna left. They hug in a very tender moment as they both know this is their last breakfast together. Joanna calls from the ground floor, asking Ted to come down to talk. She tells Ted that, while she loves Billy and wants him with her, she knows that he is already home, and that his true home is with Ted. She will therefore not take him. As she enters the elevator, she asks her ex-husband "How do I look?". The movie ends with the elevator doors closing on the emotional Joanna, right after Ted answers, "You look terrific," as she heads upstairs to talk to Billy.