# Math.pow()

• 0
• Question
• Updated 10 months ago
I am trying to recreate a loan calculator I had originally created in javascript. The problem is I cannot find a workaround for the Math.pow() method. I would like to do this without IOL and stick to QuickBase formulas

const principal = parseFloat(amount.value)
const calculatedInterest = parseFloat(interest.value) / 100 / 12
const calculatedPayments = parseFloat(years.value) * 12

// Compute monthly payment
const x = Math.pow(1 + calculatedInterest, calculatedPayments)
const monthly = (principal * x * calculatedInterest) / (x - 1)

if (isFinite(monthly)) {
monthlyPayment.value = monthly.toFixed(2)
totalPayment.value = (monthly * calculatedPayments).toFixed(2)
totalInterest.value = ((monthly * calculatedPayments) - principal).toFixed(2)

//Show Results
document.getElementById('results').style.display = 'block'

//Hide Spinner
} else {

}
• 596 Points

Posted 10 months ago

• 0

QuickBaseCoach App Dev./Training, Champion

• 69,994 Points
what does math.pow do?

There is a native exponent function in Quick Base

for example

10^2 = 100

^ means "to the power of"

• 596 Points
Ha, that simple! thank you