hankknight
asked on
Math: Percent that number is between two numbers
How can I figure out what percentage that one number is between two other numbers?
For example, the price of Commodity X is currently $12.34 per pound.
This week's low price was $11.11 per pound and this week's high price was $22.22 per pound.
I tried solving this with JavaScript but I have the math wrong:
For example, the price of Commodity X is currently $12.34 per pound.
This week's low price was $11.11 per pound and this week's high price was $22.22 per pound.
I tried solving this with JavaScript but I have the math wrong:
var low = 11.11;
var high = 22.22;
var current = 12.34;
alert( current * low / high ); // This is not correct
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.