When headlights fail, it's never at a good time. Face it, the only time they're visible is when you need them, specifically at night, and there's rarely an indication of when one will stop working. Given this, it's good to know the approximate life of your headlights. But even with a ballpark figure in hand, bulbs have an annoying tendency to under- or over-shoot the average because so many factors affect their longevity.

So how long do headlights typically last? As your mechanic will tell you: It all depends.

This lifespan estimate is developed using a complex formula involving voltage, watts, lumens and a few other factors. Each contributing factor, as well as real world testing, is crunched together and an approximate number is determined.

The first factor to consider in headlight life is the type of lighting system in the car (though this will later be supplanted by a more critical factor). Currently, there are three rather wide lighting categories in use. We'll start with the two less common types before moving on to the one seen in the majority of cars.

The first is high intensity discharge (HID) lamps. These lamps use metal halide suspended in xenon gas, and have an estimated lifespan of about 2,000 hours. The lamps use a ballast system to even out the electrical output of a vehicle's base electrical system. That electricity jumps between two arc points and excites the gas in between. Xenon is used, rather than other gases like argon, because it produces light immediately when switched on. Other gases could take upwards of more than a few minutes to produce light.

The advantage of these systems is the amount of light produced relative to the electricity used. In automotive applications, HID systems produce more light using less electricity. Auto manufacturers and companies that build and sell HID headlamps see this as a way of reducing carbon dioxide emissions as the car's engine works less to produce the required amount of electricity.

While the legalities of HID systems are in question, some agencies, including the National Highway Traffic Safety Administration (NHTSA), see the lights as too bright for the road. However, many drivers like the HID lamps. The bulbs produce a cool, bright blue-white light that allows for better night driving.

Another less common type of headlight uses Light Emitting Diodes (LED). While we have seen some applications in turn signal, brake, tail and accessory lights, this new system has seen little application in the headlight market. Indeed, at this point they're so new that no firm lifespan numbers have been published by producers or the few European automakers currently using them. The 2010 Toyota Prius boasts LED headlamps and the company claims they'll last longer than an HID system -- but they won't say how much longer.

Much of the challenge behind making LED systems a common reality is dealing with heat. While consumers see LEDs as a "cool" light source, they actually produce a lot of heat -- but it's at the back end of the unit rather than at the bulb surface. Stacking several LED units together and allowing for a cumulative heat build-up can quickly shorten the life of these components.

Manufacturers are now grappling with ways to dissipate that heat, including auxiliary fans and vented headlight units.

Heat inevitably kills most headlights -- as well as engines, transmissions, brakes and other car systems, too. It's also the biggest factor in shortening the lifespan of the industry's most common bulb -- the halogen headlight. So keep reading to find out how long you can expect these ubiquitous light sources to last in your car.