I need to calculate the price based on the bid structure for these lines:
$303.00 fixed price up to 500 units
$0.023 additional per unit from 501-10,000 units
$0.022 additional per unit from 10,001-25,000 units
$0.021 additional per unit from 25,001-50,000 units
I lost a little when setting up the database structure and the algorithm (a larger anchor point) to calculate this. Has anyone done this? Is there a nice, elegant way to calculate these kinds of things?
edit: As an example, 25,100 units would cost $ 303.00 for the first 500 units, $ 218.50 for the next 9,500 units, $ 330 for the next 15,000 units, and $ 2.10 for the next 100 units totaling $ 853.60.
It will not be a simple calculation 25 100 * $ 0.021 - I know well how to choose and calculate this.
Similar to how income tax is assessed - on a marginal basis.
source
share