Adam Learner (Joseph Gordon-Levitt) is a 27-year-old journalist with an attractive girlfriend, Rachael (Bryce Dallas Howard), of whom his best friend and co-worker Kyle (Seth Rogen) disapproves.
Adam discovers he has a a rare cancer and must undergo chemotherapy. After Adam reveals his diagnosis, his overbearing mother, Diane (Anjelica Huston), who already cares for a husband suffering from Alzheimer's disease, is determined to move in with him. He rejects this offer, however, as Rachael has promised to be the one to take care of him.
Adam skeptically begins going to the young and inexperienced therapist, Katie McCay (Anna Kendrick), and although their relationship and sessions get off to a rocky start, he slowly begins to open up to her about his disease and how it is affecting him. The two develop a rapport both in and outside of their sessions, as the lines between doctor-patient and friends begin to blur. During chemo treatments, Adam also befriends Alan (Philip Baker Hall) and Mitch (Matt Frewer), two older cancer patients who give him perspective on life, love, and illness.
Meanwhile, Kyle attempts to keep Adam's spirits high, which includes using his illness as a way to pick up women. He also uses his friend's illness to his own advantage, to Adam's annoyance. On a date with a woman he met through these means, Kyle sees Rachael kissing another man and tells Adam, who proceeds to break up with her, despite her excuses and protestations.
Although Adam at first claims to everyone that he is fine and handling his disease well, his composure slowly begins to unravel as the realities and seriousness of his illness become increasingly sharper. When the doctor informs him that his body is not responding to the chemotherapy and his only option is dangerous surgery, he is forced to emotionally confront his situation, and figure out what and who in his life is truly important to him.