Is Knight's $440 million glitch the costliest computer bug ever?

computer bug knight
Knight Capital's computer bug cost the firm $440 million, making it one of history's most expensive software glitches.

When it comes to lethal bugs, the computer glitch that set fire to $440 million of Knight Capital Group's funds last Wednesday ranks right up there with the tsetse fly.

In less than an hour, Knight Capital's computers executed a series of automatic orders that were supposed to be spread out over a period of days. Millions of shares changed hands. The resulting loss, which was nearly four times the company's 2011 profit, crippled the firm and brought it to the edge of bankruptcy. Knight (KCG) only survived after a group of investors swooped in with a $400 million lifeline.

Reversing the errant trades cost almost half a billion dollars. Which raises the question: Where does this fall on the all-time list of history's most expensive computer meltdowns?

There have been a few epic debacles. For instance, in all the excitement of Monday's Mars rover landing, people have largely forgotten the fiascos of previous Mars missions.

In 1999, NASA's Mars Climate Orbiter overshot its target when trying to move into orbit around the red planet. It burned up in the atmosphere. The reason: One engineering team working on the spacecraft used metric measurements while another team used Imperial units.

Later that year, the Mars Polar Lander crashed due to a malfunction that caused it to shut down its main engines before it had reached the planet surface. Total cost of the two failures: $357 million.

Other space agencies have had their own meltdowns. The 1996 maiden flight of the European Space Agency's state-of-the-art Ariane 5 rocket ended in a spectacular explosion over French Guiana. The rocket's inertial guidance system failed to convert a piece of data from a 64-bit format to a 16-bit format. Estimates on the cost of the lost rocket and cargo run to $500 million.

Then there was the 2003 blackout in North America, which deprived an estimated 50 million people of power. The blackout was made possible by a bug in General Electric's Unix-based monitoring software that kept operators from learning of a local power outage. The glitch's domino effect cut off power in eight U.S. states and in Ontario, Canada.

"Computers do what they're told," says Lawrence Pingree, an analyst at Gartner. "If they're told to do the wrong thing, they're going to do it and they're going to do it really, really well."

The cost of some IT failures has climbed into the billions. Last year news broke that the U.S. Army's $2.7 billion cloud-computing system for intelligence sharing among troop commanders in Iraq and Afghanistan was all but useless.

"Almost any commercial solution out there would be better," one analyst told Politico.

The single most expensive computer problem of all time may be the Y2K bug. Research firm IDC estimated that U.S. businesses, government agencies and individuals spent nearly $200 billion dealing with the problem.

The costs for such huge, systemic issues are hard to pin down. One widely cited study on the 2003 blackout puts its total cost at around $6 billion. Most of that price tag, though, comes from "lost income," a hard-to-measure variable.

When computer bugs affect the financial markets -- something that's happening more and more often -- the losses can be tallied precisely.

Investment firm AXA Rosenberg shelled out $217 million last year to cover investor losses from what it called a "significant error" in the computer code for one of its investment models. It paid an extra $25 million penalty to regulators after it was caught trying to hide the mistake.

Nasdaq is still dealing with the fallout of its glitch-plagued Facebook (FB) IPO. The exchange operator earmarked $62 million for reimbursing investors and says it expects to incur significant costs beyond that for system upgrades and legal battles. Investors say their actual losses are much higher that what Nasdaq plans to cover; Knight Capital, for example, says it lost $35 million.

Some glitches have taken down entire markets. Derivatives trading on the Tokyo Stock Exchange stopped for 95 minutes on Tuesday morning after a computer glitch was found to be affecting a crucial server. The day before, Spanish exchange Bolsas y Mercados Españoles was halted for five hours because of a glitch.

Stock markets have become increasingly vulnerable to bugs over the last decade thanks to financial firms' growing reliance on high-speed computerized trading. Because the trading is automated, there's nobody to apply the brakes if things go wrong.

"The growing complexity is a huge contributor," says Pingree, a former currency trader. "You really can't have proper risk management until you have visibility."

He's not optimistic that things will get better unless government regulators step in to slow down most trading activity. Financial firms and stock exchanges test new software, but in trading, "the risk universe could change so dramatically within minutes that it's not humanly possible" to plan for every eventuality, he says.

CNNMoney Sponsors