Discounting and compounding are two sides of the same coin. Both are used to adjust the value of money over time. They just work in different directions: You use discounting to express the value of a future sum of money in today's dollars, and you use compounding to find the value of a current sum of money in future dollars.
Time Value of Money

Compounding and discounting are integral to the economic concept of the "time value of money." This is the idea that a sum of money in the present time has more economic value than an equal sum of money at some point in the future. In simpler terms: A dollar today is worth more than a dollar tomorrow. Say you have a choice between receiving $100 now or $100 in one year. If you take the $100 now, you can invest it. Even if you put it in an account earning a scant 1 percent annual interest, you'd have $101 a year from now, compared with just $100 if you waited to receive the money. The $100 is worth more, therefore, if you take it today.
Compounding Into the Future

Compounding allows you to project what a given sum of money will be worth in the future. Say you have $100 and you want to know what it will be worth a year from now. Compounding requires you to make an assumption about the kind of return you can earn on your money if you invest it. Say you assume you can earn an average four percent annual return. In one year, therefore, you forecast that you will have $104, or $100 multiplied by 1.04. After another year, you'll have $108.16 — or $104 times 1.04. With compounding, each year's earnings become part of the next year's principal, which allows money to grow faster.
Discounting to Present Value

Discounting is the opposite of compounding. You're taking a sum of money from a point in the future and translating it to its value in today's dollars — which usually will be less. Continuing from the previous example, say you assume an annual return of four percent. If you were to invest $96.15 today at a four percent annual return, you would have exactly $100 a year from now. Therefore, $100 a year from now is really worth just $96.15 today. This is called discounting to present value.
Applications

Finance professionals use compounding and discounting all the time to evaluate investments. Since money changes in value over time, you must express all cash values in the "same" dollars to be able to compare them. Say you're considering a project that will require $100,000 in upfront costs now and deliver $25,000 a year in revenue for the next four years. When you discount that future revenue to present value, it will add up to less than $100,000, so the project is a moneyloser. Similarly, a project that produces $100,000 in revenue now but will require a payment of $100,000 in five years is a moneymaker, since the upfront payment will compound to well over $100,000 in the intervening years.
Formulas

The formulas for discounting and compounding are quite basic. In these formulas, "CF" is the cash flow, or the amount being converted; "n" is the number of years over which you're converting the amount; and "r" is the assumed average annual rate of return.
To discount a future cash flow to present value (PV):
PV = CF / (1 + r)^nTo determine the future value (FV) of a cash flow after compounding:
*FV = CF (1 + r)^n**The relationship between discounting and compounding is evident from the similarity between the formulas. When discounting, you divide the cash flow by the factor "(1 + r)^n," which reduces the present value of the cash flow. When compounding, you multiply the cash flow by the same factor, which increases the future value of the cash flow.
References
 Corporate Finance: The Core, Second Edition; Jonathan Berk and Peter Demarzo
 New York University Stern School of Business: Time Value of Money
 Accounting Coach: Calculating Present Value
 Accounting Coach: Calculating Future Value