Simple Interest Calculator - Problem
Calculate the simple interest and total amount given the principal amount, rate of interest per year, and time period in years.
Simple interest is calculated using the formula: SI = (Principal × Rate × Time) / 100
The total amount is: Total = Principal + Simple Interest
Return both the simple interest and total amount as floating point numbers with 2 decimal places precision.
Input & Output
Example 1 — Standard Loan
$
Input:
principal = 5000, rate = 8, time = 3
›
Output:
[1200.0, 6200.0]
💡 Note:
Simple Interest = (5000 × 8 × 3) / 100 = 1200. Total Amount = 5000 + 1200 = 6200
Example 2 — Short-term Investment
$
Input:
principal = 1000, rate = 5, time = 2
›
Output:
[100.0, 1100.0]
💡 Note:
Simple Interest = (1000 × 5 × 2) / 100 = 100. Total Amount = 1000 + 100 = 1100
Example 3 — High Interest Rate
$
Input:
principal = 2500, rate = 12, time = 1
›
Output:
[300.0, 2800.0]
💡 Note:
Simple Interest = (2500 × 12 × 1) / 100 = 300. Total Amount = 2500 + 300 = 2800
Constraints
- 1 ≤ principal ≤ 106
- 0.1 ≤ rate ≤ 50
- 0.1 ≤ time ≤ 100
Visualization
Tap to expand
💡
Explanation
AI Ready
💡 Suggestion
Tab
to accept
Esc
to dismiss
// Output will appear here after running code