(Flickr/NapInterrupted)

Paying off credit card debt can take a really, really long time.

Just how long it takes depends not only on the total amount of debt and the interest rate, but also on how big your paycheck is. A rule of thumb some credit counselors use is that credit card payments should not take up more than 15 percent to 20 percent of your monthly income.

Using that guideline, CreditCards.com looked at the 25 largest cities in the country and calculated how long it would take someone earning the median income to pay off the average credit-card balance.

Out of the cities studied, Washington had the highest average credit-card balance of $5,046 as of last year. But with a median income of $45,909 — also the highest for the 25 cities — consumers there may not be as burdened by their debt as consumers in other cities with lower average debt levels, says Matt Schulz, senior industry analyst for CreditCards.com. A person earning the median income in D.C. and paying 15 percent of earnings toward the debt could be debt-free in 10 months and pay $286 in interest, assuming a 13 percent interest rate.

San Antonio had the lowest average credit-card balance at $4,880. But because of the lower median pay — of $27,491 — consumers there may struggle more to pay off their debt. The site calculated that someone earning the median paycheck would need to make payments for 16 months and pay $448 in interest before their cards were paid off.

People in San Francisco would have the easiest time affording their credit card debt. Paying off the average balance of $4,393 would take nine months for someone making the median $42,613 and dedicating 15 percent of their pay to the cause.

Short of asking for a raise, there are a few steps you can take to speed up the process. For starters, always make more than the minimum payment, Schulz says. Otherwise interest charges can pile up and the process can take much longer.

Borrowers should also try to lower the interest rate being charged on the debt, Schulz says. If you can’t transfer the balance to a zero-percent credit card, call the credit-card issuer to see if they will lower your interest rate, he suggests. Even a small decrease of one or two percentage points can make a difference, he says.

Consumers can also ask credit-card issuers to waive other fees, says Bruce McClary, a spokesman for the National Foundation for Credit Counseling. For instance, some companies might waive annual fees for some customers, he says.

When figuring out which card to pay first, targeting the credit card with the highest interest rate may save the most money, McClary says. Some people may be more motivated by paying the smallest balance first and then using the payments that used to go there to pay off the other cards.

Of course, the best move is to pay off the balance in full each month, both Schulz and McClary say.

Read more:

5 credit card fees you didn’t know existed

The cities where Americans are most likely to spend more than half of their paycheck on rent

5 reasons someone making $75,000 would live paycheck to paycheck