
Storyline
In New York City, high-strung commodity futures trader Joy Ellis McNally (Cameron Diaz) is dumped by fiancé Mason at his surprise birthday party which she throws. At the same time, easy-going carpenter Jack Fuller Jr. (Ashton Kutcher) is fired by his father, Jack Sr. Both are distraught and, with best friends Toni "Tipper" (Lake Bell), who is a bartender, and Jeff "Hater" (Rob Corddry), a lawyer, take debauched trips to Las Vegas.
Joy and Jack meet by chance when given the same hotel room due to a computer error. Once the misunderstanding is cleared up and receiving upgraded rooms and coupons to various clubs, they party and drink together and end up getting married. The next morning, agreeing it was a mistake, they plan to divorce.
Before they can, Jack uses a quarter Joy gives him in a slot machine. He hits a three million dollar jackpot and Joy reminds him they are married and hence, she is entitled to half of the money. They return to New York, where they attempt to divorce. The judge declares they cannot divorce until they attempt to co-exist for six months, while attending weekly sessions with marriage counselor Dr. Twitchell. If they work at the marriage but still want to divorce after six months, each can keep half the winnings. If either party does not cooperate, the money will be tied up in litigation by the judge.
The newlyweds devise more and more cunning schemes to undermine each other, such as Jack telling Joy that their counseling session is canceled to show she is not committed, and Joy inviting girls to their apartment to seduce him, throwing a party. Jack gives Joy's ex-fiancé, Mason, her engagement ring back without Joy knowing. However, at Joy's work retreat, they unexpectedly find themselves attracted to each other.
Returning from the retreat, it is time for the judge to decide what happens to the money. On her way to the hearing, Joy sees Mason, who tells her he wants her back. Giving back the engagement ring, he tells her she is good enough for him. Joy thinks Jack set her up with Mason to cheat on him to guarantee divorce. She walks away from Mason and goes to the hearing. There, the marriage counselor testifies that the couple worked on the marriage. The judge decides they will split the remaining 1.4 million dollars (after taxes, bills Joy ran up, and money Jack spent on his new woodworking business). Joy tells the judge she does not want any of the money and as she leaves she gives the engagement ring to Jack, telling him she wants nothing from him.
Joy is offered the promotion, but declines it, telling her boss she would rather be happy doing nothing than miserable doing something she hates. Jack's parents tell him it looks like he and Joy are in love. Realizing his mistake, he goes to find her. Tipper tells Jack that she quit her job and nobody knows where she is. He suspects that she has gone to Fire Island, New York, the only place that makes her feel truly happy. Finding her, Jack proposes (again) and she says yes.
During the closing credits, there are scenes from the day Jack and Joy get married, of Tipper and Hater subsequently enacting a plan of revenge on Mason, and of Hater cutting off Dave.