Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maths behind sliding scale pricing [closed]

Tags:

php

math

I'm trying to work out a simple calculation for the following:

a phone model has the maximum sale price of £85.00 and this is if only 1 unit is purchased and a minimum sales price of £50.00 - this is if 150 units and over are purchased in one.

How can I work out a way of the price if between 2 and 149 units are purchased??

Thanks, B.

like image 812
Bifterss Avatar asked Jun 01 '11 14:06

Bifterss


1 Answers

Formula:

Y = 50 + ((85 - 50) / (150 - 1)) * (X - 1)

Result:

X = 1    -->   Y = 85
X = 33   -->   Y = 57.52
X = 150  -->   Y = 50
like image 193
Anne Avatar answered Oct 09 '22 23:10

Anne