# Javascript program to enter the P, T, R, and calculate its Compound Interest

ADVERTISEMENTS

Javascript program to enter the P, T, R, and calculate it's Compound Interest. There are you will learn how to find the Compound Interest through P, T, R in javascript language.

**Formula:**

*CI = P * pow((1 + R / 100), T)*

**Where:**

*P = Principal Amount*

*T = Time*

*R = Rate*

*CI = Compound Interest*

Let us understand this example through javascript program:

```
/* Javascript program to enter P, T, R, and calculate Compound Interest */
<script type="text/javascript">
var p, t, r, CI;
// p = principal
// t = time
// r = rate
// CI = compound interest
/* Calculate compound interest */
p = 5;
t = 7;
r = 9;
CI = p * (Math.pow((1 + r / 100), t));
// Output
document.write("Compound Interest = " + CI);
</script>
```

**Output Screen:**

Compound Interest = 9.140195604083454