When my iPhone died an unexpected death after about 15 months of use, I held my breath and called Apple. No worries, they said, your extended warranty is still in force. An hour later I was at an Apple store where my new phone was waiting for me and I felt pretty good. After all, my AppleCare policy cost $69; a new phone was about $200, so I came out $140 ahead. Not a bad return on my investment. \n\nIt turns out, though, that I was one of the lucky ones. Extended warranties, says Joe Ridout of Consumer Action in San Francisco, generally don't pay off. On average, retailers and manufactures only pay out about 50 cents of every dollar they take in on extended warranties. Which is also a pretty good return on investment\u2014for the vendors. \n\nAre extended warranties always a bad idea? Ridout is quite negative about them. "Sometimes you win the lottery, but that doesn't mean it's a good investment," he told me. "Extended warranties are a very bad investment." \n\nIn general, he's right, but there are times when it's a good investment to spend the extra money. Here are some tips that will help you decide, as well as some suggested alternatives to in-store extended warranties pushed by the likes of Radio Shack and Best Buy. First, thoroughly check the manufacturer's warrantyUnlike mechanical things, most electronic devices that have a defect will fail pretty quickly, or won't work at all when you try to power them on. Warranties generally cover you for 90 days, plenty long enough for that lemon to show its colors. Weigh the cost and convenience of potential repairs It turns out many repairs cost no more than the price of the warranty, according to data from Consumer Reports. Of course, it's getting harder and harder to find a business that will repair consumer electronics, so if you live in an area that doesn't have that kind of service reasonably close by, a warranty might be a reasonable expenditure. Check the price of the item against the cost of the warranty I remember buying a set of earbuds for $30 or so at a Radio Shack and being asked if I'd like to spend another $7.50 to protect myself. Ridiculous. That's nearly one dollar in warranty for every $3 of goods. Shop carefully There's no excuse for not doing some homework before you buy any piece of hardware. Our sister site, PCWorld, is a great source of information on many types of digital devices from printers to cameras.Alternatives to in-store extended warranties\n\n1.\tYour credit card may cover you. And since you probably have more than one in your wallet, there's a good chance that at least one of them will have that feature. \n2.\tBuy at the right store. Ridout says that Costco, for example, offers the equivalent of an extended warranty on many items for no additional cost. \n3.\tBuy a third-party warranty; often they are significantly cheaper than the ones offered by the retailer. I've heard good things about SquareTrade.com from Ridout and from InfoWorld's Gripe Line columnist Christina Tynan-Wood, who had this to say about SquareTrade.com. Acording to SquareTrade CEO Steve Abernathy , warranties generally cost about 20 percent of the purchase price of an item; his company sells them for about 12 percent of cost. \n\nExtended warranties on computers, rather than gadgets, are a harder decision. I advise you start by thinking not so much about the cost of repairs, but the cost of technical support. \n\nSome PCs are sold with free technical support for 90 days after purchase, although the hardware warranty is valid for 12 months. Others have free support for a year. Find out exactly what's covered by the warranty before you buy anything. \n\nComputers, particularly Windows machines, tend to have odd software-related problems as they get older. They can be tricky to solve and finding support after the warranty expires can be expensive. Many companies charge close to $50 per tech support incident, with no guarantee that your problem will be solved, and no refund if it isn't. \n\nIf you like to geek around with your PC, or have a friend who's willing and able to help you solve typical problems that's great. But if not, being able to call the PC maker as many times as you need to may well be worth the expense of the extended warranty. Of course, with the exception of Apple, the support offered by computer makers is spotty, but imperfect help is better than none. \n\nSmartphones are less clear cut. They're somewhat fragile, but a lot of the things you do to break them (letting them get wet, for instance) aren't covered by the warranty\u2014extended or regular. But not many places will fix them. They're also fairly complex, so having access to decent support can be important. \n\nConsider this: More than one in four iPhones break or fail within two years, according to SquareTrade, which covers iPhones among other gadgets. As for Blackberries, RIM doesn't offer extended warranties, the carriers do, or you can find a third-party like SquareTrade. If you travel a lot or are not super careful with your smartphone, an extended warranty on the BlackBerry is probably well worth the cost since these devices are much more accident prone than say, your printer. \n\nSan Francisco journalist Bill Snyder writes frequently about business and technology. He welcomes your comments and suggestions. Reach him at firstname.lastname@example.org.Follow Bill Snyder on Twitter @BSnyderSF. Follow everything from CIO.com on Twitter @CIOonline.