Architect Peter Mitchell, cartoonist Michael Kellam, and actor Jack Holden are happy bachelors in their shared NYC penthouse apartment, with frequent parties and flings. The movie opens with Peter celebrating his birthday with a large party. The following day, a baby named Mary arrives on their doorstep with a note revealing she is the result of Jack's tryst with an actress named Sylvia during a Stratford Festival Shakespearean production a year prior.
Jack is in Turkey shooting a B movie, and makes arrangements with a director friend to have a package delivered to the apartment. Jack asks his roommates to keep the delivery a secret per his friend's wishes; when Mary arrives, they believe she is the "package".
Peter and Michael are totally befuddled as to how to care for Mary, and Peter leaves to buy supplies. Their landlady Mrs. Hathaway delivers a small box – the actual "package" of heroin – which Michael tosses aside. They learn to care for Mary, including diaper changes, baths, and feedings. Sleep eludes them as they work to keep the lights and noises of NYC from waking up Mary at night. Peter tries reaching out to his semi-regular girlfriend, Rebecca, who was on a date with a cellist, for aid in taking care of the baby. Rebecca showed no interest as she was on a date with the cellist.
Four days later, two drug dealers, Vince and Satch, arrive at the apartment for the package. Peter and Michael mistakenly give them Mary, along with a can of powdered milk the dealers believe is the heroin. After relinquishing Mary over, both men have a sigh of relief until Peter discovers the actual package in the sofa. Realizing their mix-up, he runs downstairs but trips, spilling the packages' contents. He gathers up the drugs and confronts the men outside, attempting to correct the error but causes a scuffle. A police officer on horseback intervenes; Peter rescues Mary, but the dealers flee with the can of powdered milk. The officer detains Peter and Michael at the apartment until Sgt. Melkowitz, a narcotics officer, arrives to question them. Jack calls from Turkey, but Peter and Michael are unable to talk openly as they are being recorded. They successfully hide the drugs, learning that Jack's friend Paul Milner is a drug dealer. A suspicious Melkowitz puts them under surveillance.
Mrs. Hathaway babysits Mary while Peter and Michael go to work. Returning home, they find Mrs. Hathaway bound and gagged and the apartment ransacked by the dealers, but Mary safe as Peter found her stowed away in a closet crying. A note threatens, "Next time we'll take the baby". Peter and Michael continue to care for Mary, adjusting to 'fatherhood' and growing attached.
In the middle of the night, there is an intruder that sneaks into the apartment. Peter incapacitates the intruder, who turns out to be Jack returning early after his movie role was cut. Michael, seeing it is Jack lunges at him in anger after what he and Peter went through. When confronted about the mess they were in, Jack assured Peter and Michael he knew nothing about the heroin. Peter and Michael then introduced Jack to Mary. Jack initially denies his connection to Mary, but Sylvia's note convinces him he is Mary's father. It clicked into Jack's head as he brought up their initial fling. Peter and Michael pass all parenting responsibility to Jack, who immediately begins having the same trouble Peter and Michael had. Jack reaches out to his mother and asks her to raise Mary until she is a bit older, but his mother refuses, citing that Jack is a grown man and it was his responsibility. Eventually Jack got the hand of fatherhood and began to grow to love her.
The trio later receive a news clipping in the mail showing that Milner was attacked by the drug dealers and hospitalized – with another threat: "Don't let this happen to you!" Peter, Michael, and Jack formulate a plan to not only trap the dealers but get the NYPD off their backs by arranging a meeting. Jack, disguised as a pregnant woman, leaves the building with Mary, while Peter and Michael leave in a cab, followed by undercover officers, but manage to lose them in another cab driven by Jack. Peter chooses to meet the dealers at the top floor of a construction site. Jack is in the alleyway keeping watch while manning the elevator switches, but his attention is turned to Mary, who was in need of a diaper change. Michael is hidden in the vents and records Peter's conversation with the dealers as Peter stated they had no role in any of their dealings, and Vince and Satch acknowledged him. While filming, Michael tumbles over in the ductwork, and a chase ensues. Peter and Michael reach one of the elevators while Vince and Satch take the other. Jack accidentally hits the wrong switch, trapping Peter and Michael. Jack then corrects his mistake by hitting the right switch and the trio manage to trap the dealers in an elevator as the police arrive. With the recording Michael made, they prove their innocence to Melkowitz, and the dealers are arrested.
Peter, Michael, and Jack fully embrace their role as Mary's guardians, from taking her to the park, to even singing "Goodnight Sweetheart" as a lullaby, until Sylvia arrives to take Mary with her to London. Peter revealed to her that Mary was teething and Sylvia was astonished to see her daughter growing. After she leaves with Mary, the three realize how desperately they miss the baby. Racing to the airport, they just miss Sylvia's plane for London. Defeated and depressed, they return home to find Sylvia and Mary at the door. Sylvia tearfully says she does not want to give up acting but must if she has to raise Mary alone. They invite her and Mary to move in, with Peter stating he would build Sylvia a room. Sylvia accepts, and the four live happily with the baby. The movie closes showing that the mural that had adorned their entryway now depicts the three men and Sylvia pushing Mary in a stroller.
Tom Selleck as Peter Mitchell, one of the 3 roommates, an architect and the center figure of the trio
Steve Guttenberg as Michael Kellam, the youngest of the three roommates and a cartoonist
Ted Danson as Jack Holden, one of the 3 roommates, a skilled actor and Mary's birth father
Lisa and Michelle Blair as Mary, the baby and Jack's legitimate daughter
Margaret Colin as Rebecca, Peter's old flame
Celeste Holm as Mrs. Holden, Jack's mother
Nancy Travis as Sylvia Bennington, Mary's mother, an actress with whom Jack had a fling
Alexandra Amini as Patty
Peter Brown as Store Clerk
Francine Beers as Woman at Gift Shop
Philip Bosco as Sgt. Melkowitz, an NYPD narcotics detective
John Gould Rubin as Paul Milner, a TV commercial director and Jack's friend
Paul Guilfoyle as Vince, one of the drug dealers Milner had dealings with
Earl Hindman as Satch, one of the drug dealers Milner had dealings with
Barbara Budd as Actress
Michael Burgess as Man at Party
Claire Cellucci as Angelyne
Eugene Clark as Man #2 at Party
Derek de Lint as Jan Clopatz, Rebecca's new beau and a concert cellist
Dave Foley as Grocery Store Clerk
Jackie Richardson as Edna
Cynthia Harris as Mrs. Hathaway, the landlady of the apartment complex the three men reside in
Colin Quinn as Gift Shop Clerk
Mario Joyner as taxi driver
The script was based on the 1985 French film Trois hommes et un couffin (Three Men and a Cradle).
The film won the 1988 People's Choice Award for Favorite Comedy Motion Picture