Total consumer credit card debt reached a high of more than $1 trillion in May, partly due to a 22 percent spike in late payments over the last five years. Making matters worse: During the same time period, the average annual percentage rate (APR) went up 35 percent. Translation: Not only are more Americans carrying a balance, but they’re being charged greater interest rates on what they owe.

Although 47 percent of people don’t pay off their credit card in full each month, only 29 percent say they prioritize interest rates when selecting a card, and two in five don’t know what their APR is. Time for some adulting: If you have credit card debt, APR is pivotal to your financial well-being. Allow us to explain.

How Is an APR Set?

A credit card’s APR is the interest rate you’re charged if you don’t pay off your balance on time, usual within 21 days from the end of your last billing cycle. It depends on three factors: the prime rate, the type of card you get, and your creditworthiness.

The prime rate is the average interest rate banks charge customers with the best credit. It’s determined by a Wall Street Journal survey of the largest banks in the U.S., and as of August 1, 2019, it was 5.25 percent. Credit card APRs typically move in tandem with this number—or another financial index, such as the London Interbank Offered Rate (LIBOR). The card issuer then tacks on an additional percentage, called a margin, to the prime rate. So a card with a 14 percent margin would clock in at 19.25 percent today (5.25 + 14). If you hear in the news that the Fed is lowering or raising interest rates, your APR is likely to mirror that shift. In other words: A higher prime rate means you’ll have to pay more for any balance you’re carrying.

The kind of card you have also influences the interest rate. A CreditCards.com survey found that the average APR ranged from 14.7 to 20.2 percent depending on the category of card. For example, retail credit cards and plastic that offers perks—like cash back, rewards, hotel points, and airline miles—tend to have a steeper APR than business credit cards or (no surprise) those marketed as low-interest cards.

Lastly, your creditworthiness—i.e., how likely you are to promptly pay back what you spent—plays a role. Individuals with higher credit scores might be eligible for a lower APR because they pose less risk of defaulting. The average APR for people with poor credit is 25.3 percent, compared to 15.1 percent for all cards, according to data from the Federal Reserve.

How Does My APR Affect What I Owe?

If you pay off your card every month, the APR might not mean a lot to you. But if you run a balance, it can have a major impact.

Let’s do the math: Even though it’s called an annual percentage rate, most credit cards actually charge compound interest, which is applied on a daily basis. To find out how much you’ll rack up each day, you need to figure out the daily periodic rate (DPR). Some credit cards list the DPR at the bottom of your monthly statement, or you can calculate it by dividing your APR by about 365 days. So, an 18 percent APR would equal a 0.05 percent DPR. Multiply that number by your unpaid balance to see how much interest you’re being charged per diem. In this example, a $5,000 outstanding bill would incur $2.50 daily. As the interest accumulates, the amount you owe snowballs since you’re being charged interest on your interest.

Bottom line: Make payments on time and in full.

What’s the Difference Between a Variable and Fixed APR?

Most cards have a variable APR, which means the interest rate is linked to an index like the prime rate, and rises and falls automatically along with that index, as described earlier. Your credit card issuer won’t inform you of changes to your rate, but the current APR will be listed on your monthly statement.

Cards with a fixed APR are harder to find these days, and are usually offered by credit unions. While the interest rate doesn’t fluctuate with the prime rate, it can still change under certain circumstances.

So When Might My APR Go Up?

Aside from being driven up by a climbing prime rate, there are a few situations when your interest rate is subject to rise, whether you have a variable or fixed APR.

First, if you miss two consecutive payments, you might get slapped with a penalty APR that can equal about 30 percent. (Some cards don’t charge penalty fees, and cards issued by a credit union tend to have lower penalty APRs.)

The CARD Act, passed by Congress in 2009 to promote fair and transparent practices by credit card issuers, mandates that companies give customers 45 days notice before a penalty APR goes into effect. During this grace period, cardholders can decide whether or not they want to keep the card under the new rate, pay the balance and close their account, or transfer the balance. The penalty APR can be applied to your outstanding balance as well as future purchases and must be reevaluated every six months to determine whether the rates merit reduction (for example, if you’ve been making timely payments).

Your APR can also go up if your credit score plummets. Card issuers check your score from time to time, and if they detect a significant drop, they might boost your APR to account for the extra risk you pose. Again, you’re entitled to 45 days’ notice before the rate changes, and after six months, the card issuer must review your score and consider lowering your rate if your score has improved.

In addition, some cards start out with an introductory APR—say zero percent interest for the first six to 12 months—and then morph into a variable interest rate after the promotional period. Make sure you read the fine print before signing up for a card so that you understand how much the rate might change.

Plus, if you’ve been under financial duress (say, due to a job loss or serious medical issue), you might have worked out what’s called a hardship plan or credit card payment plan. In this case, card issuers might give customers a temporary break on interest rates to help them out. When the terms of the hardship plan end, your rate will probably go back up.

Finally, the way you use your credit card can lead to additional APR fees. You might be charged a balance transfer APR if you move debt from one credit card to another. And using your card to withdraw cash from an ATM or cash a credit card check can trigger a (higher) cash advance APR.

Good to know: Under the CARD Act, the card issuer is not permitted to adjust the interest rate during the first year, with a few caveats: missing two payments in a row, the expiration of a promotional period, or if the prime rate (or other index) that your variable APR is tied to changes.