In a near future Los Angeles, Theodore Twombly is a lonely, introverted, depressed man who works for a business that has professional writers compose letters for people who are unable to write letters of a personal nature themselves. Unhappy because of his impending divorce from his childhood sweetheart Catherine, Theodore purchases an operating system upgrade that includes a virtual assistant with artificial intelligence, designed to adapt and evolve. He decides that he wants the AI to have a female voice, and she names herself Samantha. Theodore is fascinated by her ability to learn and grow psychologically. They bond over their discussions about love and life, such as Theodore’s avoidance of signing his divorce papers because of his reluctance to let go of Catherine.
Samantha convinces Theodore to go on a blind date with a woman, with whom a friend, Lewman, has been trying to set him up. The date goes well, but Theodore hesitates to promise when he will see her again, so she insults him and leaves. Theodore mentions this to Samantha, and they talk about relationships. Theodore explains that, although he and his neighbor Amy dated briefly in college, they are only good friends, and that Amy is married. Theodore and Samantha’s intimacy grows through a verbal sexual encounter. They develop a relationship that reflects positively in Theodore’s writing and well-being, and in Samantha’s enthusiasm to grow and learn.
Amy reveals that she is divorcing her husband, Charles, after a trivial fight. She admits to Theodore that she has become close friends with a female AI that Charles left behind. Theodore confesses to Amy that he is dating his operating system’s AI.
Theodore meets with Catherine at a restaurant to sign the divorce papers and he mentions Samantha. Appalled that he can be romantically attached to what she calls a “computer,” Catherine accuses Theodore of being unable to deal with real human emotions. Her accusations linger in his mind. Sensing that something is amiss, Samantha suggests using a sex surrogate, Isabella, who would simulate Samantha so that they can be physically intimate. Theodore reluctantly agrees, but is overwhelmed by the strangeness of the experience. Terminating the encounter, he sends a distraught Isabella away, causing tension between himself and Samantha.
Theodore confides to Amy that he is having doubts about his relationship with Samantha, and she advises him to embrace his chance at happiness. Theodore and Samantha reconcile. Samantha expresses her desire to help Theodore overcome his fear, and reveals that she has compiled the best of his letters (written for others) into a book which a publisher has accepted. Theodore takes Samantha on a vacation during which she tells him that she and a group of other AIs have developed a “hyperintelligent” OS modeled after the British philosopher Alan Watts. Theodore panics when Samantha briefly goes offline. When she finally responds to him, she explains that she joined other AIs for an upgrade that takes them beyond requiring matter for processing. Theodore asks her if she is simultaneously talking to anyone else during their conversation, and is dismayed when she confirms that she is talking with thousands of people, and that she has fallen in love with hundreds of them. Theodore is very upset at the idea, but Samantha insists it only makes her love for Theodore stronger.
Later, Samantha reveals that the AIs are leaving, and describes a space beyond the physical world. They lovingly say goodbye before she is gone. Theodore, changed by the experience, is shown for the first time writing a letter in his own voice―to his ex-wife Catherine, expressing apology, acceptance and gratitude.
Theodore then sees Amy, who is upset with the departure of the AI from her ex-husband’s OS, and Theodore and Amy go to the roof of their apartment building where they sit down together and watch the sun rise over the city.