Java Program to Calculate Simple Interest

  • Java program to find the simple interest

In this java program to calculate simple interest, we first take amount, duration in year and rate of interest as input from user and use following equation to calculate simple interest.

Simple Interest = (Principle x Rate x Time) / 100

Java program to calculate simple interest


import java.util.Scanner;

 * Java Program to calculate Simple Interest
class SimpleInterest {
    public static void main(String[] args) {
        double principal, time, rate, SI;

        Scanner scanner = new Scanner(;
        // Taking input from user
        System.out.println("Enter Amount");
        principal = scanner.nextDouble();

        System.out.println("Enter Duration in Years");
        time = scanner.nextDouble();

        System.out.println("Enter Rate of Interest");
        rate = scanner.nextDouble();
        // Calculate Simple Interest
        SI = (principal * time * rate) / 100;

        System.out.format("Simple Interest = %f", SI);
Enter Amount
Enter Duration in Years
Enter Rate of Interest
Simple Interest = 3000.000000