Adultery, money and legal probes: The common denominators in the career-ending sex scandals of former Sens. John Edwards (love child coverup) and John Ensign (affair with aide), former N.Y. Gov. Eliot Spitzer (high-priced call girls), and former HUD Secretary Henry Cisneros (lied about payments to mistress). (Gerry Broome/AP; Lauren Victoria Burke/AP; Stephen Chernin/AP; Mike Theiler/Reuters)

How is it that some political sex scandals are so ruinous — and others are magically survivable? Surely we can craft a formula.

Let’s have x represent the level of naughtiness (e-mail flirtation = 1; dead bodies = 10), and y represent the scale of coverup (1 = “God, I’m so sorry,” and 10 = hush money), then if x + y < 6 , for example, you’re safe? . . . Or does y represent the hypocrisy factor (lifelong libertine = 1; holy roller = 10)? Or the existence of photos? Or the safety of one’s seat?

But Bill Clinton and David Vitter survived their own sex scandals. (Luke Frazza/AFP; Alex Brandon/AP)

For example: Novelty! Democratic crisis-control guru Chris Lehane argues that’s what’s given Weinergate so much shock value for a scandal that doesn’t seem to involve any actual sex. The public almost assumes politicians have affairs, he said. But an underwear shot on Twitter? Strange new stuff. “This is the first social media scandal of its kind,” he said.

Embarrassing photos fanned the flames around Rep. Anthony Weiner and “Craigslist Congressman” Chris Lee. (Susan Walsh/AP; Derek Gee)

Plus: Location, location, location. Lehane says scandals can go nuclear if rooted in both N.Y.C. and D.C., two overheated media climates. “You can just see those markets ping-ponging off each other — New York reports something, D.C. follows; D.C. reports something, New York follows” — as Eliot Spitzer experienced. Not an issue for Sen. Vitter, who had an additional home-court advantage of being from New Orleans, where a little ol’ call girl controversy maybe isn’t that shocking.

Other factors: Can you manage to portray your scandal as something cooked up by partisan opponents — as Bill Clinton did? Or can you explain to the public that, yeah, you’re a dog in your personal life but it has no effect on your job? That was Alexander Hamilton’s approach when confronted with evidence of an affair, all the way back in 1795. He lost his job as Treasury secretary — but he remains on our $10 bills.

Rounding out an incomplete list: Rep. Mark Foley resigned after suggestive emails to former pages; S.C. Gov. Mark Sanford ended political career over affair; Former Rep. Bob Livingston denounced Clinton’s affair then confessed to his own; Sen. Larry Craig left politics after solicitation arrest. (Phil Coale/AP; Mary Ann Chastain/AP; William Philpott/AFP; Richard A. Lipski/The Washington Post)