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
INPUTALGORITHMRESULTPrincipal Amount$5000Interest Rate8% per yearTime Period3 years1Apply FormulaSI = (P × R × T) / 1002Calculate InterestSI = (5000 × 8 × 3) / 100 = 12003Calculate TotalTotal = Principal + SI = 6200Simple Interest$1200.00Total Amount$6200.00Key Insight:Mathematical formulas eliminate the need for iterative calculations, providing instant results.TutorialsPoint - Simple Interest Calculator | Direct Formula Application
Asked in
TCS 25 Infosys 20 Wipro 15 Accenture 12
23.0K Views
High Frequency
~5 min Avg. Time
850 Likes
Ln 1, Col 1
Smart Actions
💡 Explanation
AI Ready
💡 Suggestion Tab to accept Esc to dismiss
// Output will appear here after running code
Code Editor Closed
Click the red button to reopen