In this post, we are going to see how to calculate simple interest using Java. But before that, I am going to describe what simple interest is. So those of you already know what a simple interest is, you can move to the code. And those of you don’t know about simple interest, keep reading.

Simple interest

Suppose you have applied for a loan. The rate of interest is 8%, the payment period is five years and the principle is 400000.  So for this, the extra amount you are paying to the bank is called simple interest.

Now that you know what a simple interest is, it’s time to calculate it. So how do we calculate simple interest? There is a simple formula for that.

Here in the above formula, ‘p’ is the principal amount, ‘t’ is the time or the payment period and ‘r’ is the interest rate.

What we are going to do in this program

In this program, we are going to ask the user for the interest rate, time and principle one by one. To get user input, we will be using BufferedReader class. Based on the user input the simple interest will be calculated.

Code

Output of the program

If you have any doubt please do comment in the comment section. We will definitely try to help you. You can also Contact Us if you have any suggestion or query.

Calculate simple interest – Java Program
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *