Compound interest is when the interest you earn on a balance in a savings or investing account is reinvested, earning you more interest. As a wise man

With compound interest, you’re not just earning interest on your principal balance. Even your interest earns interest. Compound interest is when you add the earned interest back into your principal balance, which then earns you even more interest, compounding your returns.

Let’s say you have $1,000 in a savings account that earns 5% in annual interest. In year one, you’d earn $50, giving you a new balance of $1,050. In year two, you would earn 5% on the larger balance of $1,050, which is $52.50—giving you a new balance of $1,102.50 at the end of year two.

Thanks to the magic of compound interest, the growth of your savings account balance would accelerate over time as you earn interest on increasingly larger balances. If you left $1,000 in this hypothetical savings account for 30 years, kept earning a 5% annual interest rate the whole time, and never added another penny to the account, you’d end up with a balance of $4,321.94.

Interest can be compounded—or added back into the principal—at different time intervals. For instance, interest can be compounded annually, monthly, daily or even continually. The more frequently interest is compounded, the more rapidly your principal balance grows.

Continuing with the example above, if you started with a savings account balance of $1,000 but the interest you earned compounded daily instead of annually, after 30 years you’d end up with a total balance of $4,481.23. You would have earned an additional $160 from interest being compounded more frequently.

Simple interest works differently than compound interest. Simple interest is calculated based only on the principal amount. Earned interest is not compounded—or reinvested into the principal—when calculating simple interest.

Thinking in terms of simple interest, that $1,000 account balance that earns 5% annual interest would pay you $50 a year, period. The earned interest would not be added back into the principal. In year two, you’d earn another $50.

Simple interest is commonly used to calculate the interest charged on car loans and other forms of shorter-term consumer loans. Meanwhile, interest changed on credit card debt compounds—and that’s exactly why it feels like credit card debt can get so large, so quickly.

In an ideal world, you’d want your savings and investments to be calculated with compound interest—and your debts to be calculated with simple interest.

When calculating compound interest, you need to understand a few key factors. Each plays its own role in the end product, and some variables can drastically impact your returns. Here are the five key variables involved in understanding compound interest:

**Interest.**This is the interest rate you earn or are charged. The higher the interest rate, the more money you earn or the more money you owe.**Starting principal.**How much money are you starting with? How big a loan did you take out? While compounding adds up over time, it’s all based on the initial amount you deposit or borrow.**Frequency of compounding.**The pace at which interest is compounded—daily, monthly or annually—determines how rapidly a balance grows. When taking out a loan or opening a savings account, make sure you understand how often interest compounds.**Duration.**How long do you anticipate owning an account or paying off a loan? The longer you leave money in a savings account or the longer you hold on to a debt, the longer it has to compound and the more you’ll earn—or owe.**Deposits and withdrawals.**Do you anticipate making regular deposits into your account? How often will you make loan payments? The pace at which you build up your principal balance or pay down your loan makes a big difference over the long run.

There are a few ways to calculate compound interest. The easiest way is to have an online calculator do the math for you. But sometimes it’s helpful to see the moving parts.

Here’s the compound interest formula:

*A = P (1 + [r / n]) ^ n?*

- A = the amount of money accumulated after n years, including interest
- P = the principal amount (your initial deposit or your initial credit card balance)
- r = the annual rate of interest (as a decimal)
- n = the number of times the interest is compounded per year
- t = the number of years (time) the amount is deposited for

It’s important to note that the annual interest rate is divided by the number of times it’s compounded a year. This gives you the daily, monthly or annual average interest rate, depending on compounding frequency.

Here’s how that plays out with numbers: Let’s say you put $5,000 into a savings account paying 5% interest. The account is compounded monthly for 10 years. In this situation, you know P ($5,000), r (.05), n (12), and t (10). Now, let’s put those in the compound interest formula.

- A = P (1 + [r / n]) ^ n?
- A = 5,000 (1 + [.05 / 12]) ^ (12 * 10)
- A = 5,000 (1.00417) ^ (120)
- A = 5,000 (1.64767)
- A = 8,238.35

In 10 years, you’d have about $8,238 in the account. That includes your $5,000 initial deposit and $3,238 in interest.

It gets trickier if you’re planning to make additional deposits to the account. You can still solve for this yourself, but it’s probably easier with Microsoft Excel.

You can calculate compound interest in Microsoft Excel using the Future Value (FV) financial function:

*=FV(rate,nper,pmt,[pv],[type])*

- FV = future value
- rate = the interest rate per period
- nper = the total number of times interest is calculated
- pmt = the additional money you add each period
- pv = the present value, or the initial deposit. If you omit this, it’s assumed to be 0.
- type = either the number 0 or 1. 0 indicates payments are due at the end of the period while 1 indicates payments are due at the start of the period. If you omit this, it’s assumed to be 0.

If you leave out the *pmt* variable, you’ll get the same result as the first equation. To continue with the example above, here’s what would happen if you added $100 a month to your initial $5,000 deposit:

*=FV(0.05/12,10*12,100,5000,0)*

After 10 years at 5% interest, you would end up with about $23,763.

If you don’t want to do the math yourself, a compound interest calculator will do all of the work for you.

To calculate simple interest, you use a simplified version of the compound interest formula:

*A = P (1 + rt)*

- A = the amount of money accumulated after n years, including interest
- P = the principal amount (your initial deposit or your initial credit card bill)
- r = the annual rate of interest (as a decimal)
- t = the number of years (time) the amount is deposited for

If our $5,000 from before is only earning simple interest, here’s how we would calculate it:

- A = P (1 + rt)
- A = 5,000 (1 + [.05 * 10])
- A = 5,000 (1 + .5)
- A = 5,000 (1.5)
- A = 7,500

After 10 years of earning 5% simple interest, you would have $7,500, over $700 less than if your money had been compounded monthly.

Compound interest can either help or hurt you, depending on whether you’re saving or borrowing money.

**Savings accounts, checking accounts and certificates of deposit (CDs).**When you make a deposit into an account at a bank that earns interest, such as a savings account, the interest will be deposited to your account and added to your balance. This helps your balance grow over time.**Investment accounts.**Earnings in your investment accounts also compound over time. The percentage that stocks gain from day to day are calculated based on their performance the day before, meaning they compound each business day. If you reinvest your dividends and make regular deposits, you can help your balance grow even faster.**Student loans, mortgages and other****personal loans.**Compound interest works against you when you borrow. When you borrow money, you accrue interest on any money you don’t pay back. If you don’t pay the interest charges within the period stated in your loan, they’re “capitalized,” or added to your initial loan balance. After that, future interest accrues on the new, larger loan balance. Calculate how much your interest will add up to (and how much extra payments can save you) with our student loan calculator.**Credit cards.**Each month, your credit card charges interest on your balance on the card. If you never charge anything else to the card and you pay the accrued interest each month, your balance will stay the same. But if you don’t pay enough to cover the month’s new interest, it will be added to your credit card balance. Then, the next month’s interest is calculated based on that higher amount. Over time, this can cause your balance to skyrocket.

**Give yourself time.**With compound interest, the power of time is everything. The sooner you start saving or investing, the longer you give that money to grow. This is why it’s important to start investing for retirement as soon as possible. The earlier you start, the less of your own money you have to save. The bulk of your retirement funds can be grown through compounding.**Pay down debt aggressively.**Compound interest works against you when you borrow money, whether that’s via student loans, credit cards or other forms of borrowing. The faster you can pay those down, the less you’ll owe over time.**Compare APYs.**The annual percentage yield, or APY, will give you a better idea of what you’ll earn or be charged in interest than the annual percentage rate, or APR. That’s because the APY accounts for compounding, while the APR is the simple interest rate.**Check the rate of compounding.**The more frequently an account compounds interest, the more you’ll earn. (Or the more you’ll owe.) Ideally, you want your savings products to compound as frequently as possible and your debts to compound as infrequently as they can.

Compound interest and compounding can supercharge your savings and retirement potential. Successful compounding lets you use less of your own money to reach your goals. However, compounding can also work against you, like when high-interest credit card debt builds on itself over time. That’s why compounding is a powerful motivator to pay off your debts as soon as you can and start investing and saving your money early.

© 2024 Forbes Media LLC. All Rights Reserved

This Forbes article was legally licensed through AdvisorStream.