I'm not good with math functions at all, but I've searched for a while and couldn't find anyone even touching on this subject.

I'd like to have the price of $900 slowly approach $1500 between the dates of April 1st and August 1st. That's about $5 per day, and the formula would be:

ROUND(1500 - (600 * ((DEADLINE - TODAY) / (DEADLINE - START)))

But how do I express that in terms of javascript and HTML so that I can write it out in a sentence like "Today you'll have to pay $920."

Thanks for any help you're able to provide.

The 1500 is it a known value or? If it a known value then I would do it the other way around. Which is to divide 1500 but the number or days, let say from the first day it was entered so let say it has to be 1500 in 30 days. So dividing the 1500 by 30 will give you the value to add each day.

Is that approach ok with you?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.