Seeing your own little Johnny or Jenny grow up to be president has traditionally been regarded as a pinnacle of parenting.

If you're a parent, you might want to rethink that.

The families that have produced U.S. presidents aren't always great role models. In fact, they show a striking tendency to be deeply flawed. The childhoods of past presidents have been marked to an unusual degree by absent fathers, mothers so overinvolved that they could easily have been the original helicopter parents, and in some cases outright dysfunction, based on interviews with historians and family-history scholars and a review of presidential history books.

Childhood events that would destroy most children seem somehow to spark greatness in leaders-to-be, says Doug Wead, author of two books on presidents' families. As two candidates with highly unusual family backgrounds vie for the presidency, Mr. Wead even sees Sen. McCain and Sen. Obama -- to different degrees and in starkly different ways -- fitting a pattern he describes as "Mama's boys with absent fathers who were perceived by the sons as high achievers," he says.

To be sure, analyzing family patterns from afar, through the veil of history, risks oversimplifying them. Many presidents' families, including the parents of John Adams, Harry Truman and Dwight Eisenhower, serve as relatively positive examples. But in this era of parental perfectionism, studying the unusual ones can lend hope to parents that our children, too, can rise above our foibles and failings. Beyond any particular thing, Mr. Wead says, the key to success for past presidents was a harder-to-define internal drive.

In troubled families, children "who don't fall through the cracks really have to become transcendent to survive," says Monica McGoldrick, a Highland Park, N.J., author, psychiatrist and family-therapy expert. "When you don't have two nice parents who are very supportive ... you seek out and find sources of resilience and transcendence -- and you become amazing."

Some presidents' families have been famously dysfunctional. Thomas Lincoln abandoned 9-year-old Abraham and his sister, 12, for several months in their frontier cabin right after the death of their mother, while he went to find a new wife, says Doris Kearns Goodwin, a Pulitzer Prize-winning historian and author most recently of "Team of Rivals," a book about Lincoln. When Thomas finally returned with their new stepmother, Sarah Bush Johnston, the couple found them "wild -- ragged and dirty," seeming barely human, the stepmother later wrote.

Abraham's father was "constantly taking him out of school or making him work off debt with other farmers or making fun of him that he was lazy because he was reading" so much, Ms. Kearns says. She and other historians credit his mother, Nancy Hanks Lincoln, and stepmother with providing the nurturing and love that propelled him to leadership. "All that I am or ever hope to be," Lincoln said of his mother, "I owe to her."

In another notably troubled family, Bill Clinton's father died before Bill was born; his stepfather was a womanizer and an alcoholic who beat his mother, Virginia, according to biographer David Maraniss. Although Virginia, a warm, nurturing woman, made her son the adored centerpiece of the family, President Clinton said later that he often pined for his birth father.

Many leaders manage to draw inspiration from troubled legacies, Mr. Wead says. Sen. Obama's father, a failed Kenyan politician, separated from Barack's mother when their son was 2 years old, saw Barack for only a few weeks during his childhood and died when Barack was 21. Yet the senator as a child experienced relatives' larger-than-life stories about his father as "a morality tale," he wrote in his book, "Dreams from My Father." He focused on his father's good qualities -- as a brilliant, gifted orator with high ideals and ambitions -- and came to regard him as the embodiment of hope. "Even in his absence," Sen. Obama wrote, "his strong image had given me some bulwark on which to grow up, an image to live up to, or disappoint."

In an even stronger pattern, historians say, many presidents had dominant and eccentric mothers. When Nancy McKinley's son William became president, he set up a special telephone wire from the White House to her home in Ohio so they could talk every day, Mr. Wead says. And when young Franklin Roosevelt was quarantined with scarlet fever at his boarding school, Sara Delano Roosevelt found a ladder and climbed to his window to inspect him daily, wrote historian Doris Faber in a 1968 book on presidents' mothers.

Lyndon Johnson's mother had Lyndon sleep in her bedroom when his father was away; she "put him at the center of her life," says Ms. Goodwin, his biographer. That bond helped create in her son "that ambition to go forward in the world." Some presidents, including Woodrow Wilson and Lyndon Johnson, have actually called themselves "Mama's boys." In his book "Faith of My Fathers," Sen. McCain, too, calls himself "my mother's son."

Even the McCain family, with its tradition of distinguished military service, fits the pattern of an absent father and an overinvolved mother who fills the gap, Mr. Wead says. Sen. McCain's father was a respected four-star Navy admiral and commander of Pacific forces in the Vietnam war, but he was mostly absent from home during Sen. McCain's childhood. Sen. McCain reflects pride in his father and was taught to regard his long absences "not as a deprivation, but as an honor."

But he also spends a fair amount of ink on his fathers' failings. He writes that he grew up lacking "a loving and protective family." He describes his father as "a distant, inscrutable patriarch"; of his father's battle with alcoholism, he writes that "when he was drunk, I did not recognize him." He turned to his mother as a result, writing, "Her heart has always been large enough to encompass her children with as much love and care as any mother's child has ever enjoyed." (Both candidates declined through spokesmen to be interviewed for this column.)

Mr. Wead undertook his 2005 book, "The Raising of a President," hoping to discover "some little key" to parenting children who rise to leadership, he says. But, he found the presidents' parents "were as neurotic and possessive and awful as anybody's," he says -- a discovery he found "very liberating" as a parent. Instead, the unifying thread was "how these presidents were able to transcend these experiences or re-invent them as inspirational."

What's the takeaway for parents? "Love is the key," Mr. Wead says. Even in families that lacked discipline, future presidents were often able to find it elsewhere, in the military or school. But with enough of the crucial ingredient -- parental love -- Mr. Wead says, a child can realize, "I do not have to be a prisoner of my past."

Write to Sue Shellenbarger at sue.shellenbarger@wsj.com