Everyone hits an unexpected bill or expense now and then — a car breaks down, an air conditioner fails during a heat wave, a relative needs medical care.

While it may be tempting, one source of emergency cash that should be used sparingly, financial advisers say, is a credit-card cash advance, which is an expensive way to borrow money.

"Cash advances are almost always a bad idea," said Michael Sullivan, a personal financial consultant in Phoenix with Take Charge America, a nonprofit counseling agency.

The average interest rate for a cash advance on a credit card is nearly 24 percent, compared with an average of about 16 percent for purchases, according to a new analysis by the card comparison site CreditCards.com.

Unlike with purchases, cash advances have no grace period: Interest starts accruing right away, as soon as you borrow the money.

And most cards charge an upfront fee for cash advances — typically, either $10 or 5 percent of the advance, whichever is higher.

Say you buy a $1,000 item on a credit card with a 15.79 percent interest rate and pay the balance off within 30 days. In this case, you would pay no interest because of the grace period.

But a $1,000 cash advance will typically cost you nearly $70, even if you pay the debt down in 30 days (based on an upfront $50 fee, plus $19.73 for 30 days of interest at 23.68 percent).

Given the cost, using a card advance makes sense only if the other alternatives — such as a payday loan or car title loan, which can carry triple-digit annual percentage rates — are even worse, said Matt Schulz, senior industry analyst at CreditCards.com.

Cash advances include withdrawals at ATMs using a credit card. They may also include convenience checks — paper checks mailed to consumers that allow them to draw on their credit card.

Using a card to "buy" cash — whether it's foreign currency for travel, or casino chips while visiting Las Vegas — is also considered a cash advance by default, Sullivan said. So it's wise to make sure you understand the terms of your card to avoid unexpected charges. "You can inadvertently get a cash advance, if you're not careful," he said.

If you do take out a cash advance, Schulz said, make it a priority to pay off the balance. If you submit only the minimum monthly payment on your card, it will be very difficult to get rid of the costly debt, because most card issuers apply minimum payments first to lower-rate balances, before applying any extra payment over the minimum to higher-rate balances.

"The quicker you can pay it off, the better," Schulz said.

For its report, CreditCards.com analyzed a representative sampling of 100 credit cards from major U.S. issuers in April. It drew information from the terms-and-conditions documents, publicly available cardholder agreements and phone calls to issuers.

The survey found the highest cash advance rate in the First Premier Bank credit card (36 percent), followed by the BP Visa, the Texaco Visa and the Exxon Mobil SmartCard (all about 30 percent), and the Shell Platinum MasterCard (28 percent).

Gas and retail cards tend to carry higher rates, Schulz said, because they are often easier to qualify for, so they are considered riskier.

Ann Carrns writes for the New York Times.