0

I'm sorry if my question was too stupid, this is my first question here and i'm too bad at math.

I'm trying to develop a program and i got into this problem. I have two numbers Mix and Max.

Let's say:

Mix = 1000 Max = 2000

and the actual price now is 1500.

So what i need now is to calculate what is the percentage from the max to the low using my number 1500.

I expect like 50%.

And maybe something like 10% for 1900. And 20% for 1800 and so on.

Numbers could be much bigger but not smaller as zero.

  • 4
    percentage (as a decimal) will be (max - price) / (max - min), which means "distance from the max" divided by "total possible distance over the range" – user525966 Nov 21 '21 at 02:41
  • Welcome to MSE. What are your thoughts on the problem? What did you try? – RiverX15 Nov 21 '21 at 03:10

0 Answers0