Credit cards accrue interest daily. Your APR divided by 365 gives the daily rate, applied to your average balance each day.
Enter your balance, APR, and payment into the credit card payoff calculator to see your total interest and payoff time.
Two rules beat the math every time: pay the balance in full when you can, and never carry a balance you can not pay down quickly.