J
JamesSco
- Original Poster
- #1
For some years now I have struggled to come up with formula to calculate the price of our products based on several inputs. I'll use one specific product as an example.
Product Cost: £0.222395833333
Delivery Cost: £0.80
Required Profit: £0.40
So far seems simple, but now I need to get a final product cost based on the above figures so at the end we receive 0.40p per order. However, the final figure must also include an additional amount for VAT at 20% plus card processing fees of 2.4% + 0.20p.
For the above example I know the final price should be £2.04 which will give me a breakdown as follows:
Our Cost: £0.222395833333
Shipping Cost: £0.80000
VAT: £0.34
Fees: £0.26936
Total Cost: £1.63175583333
Customer Paid: £2.04
Profit: £0.40824
Any budding mathematicians know how this can be calculated. As it stands, I have programmed our system to add the Product Cost + Delivery Cost + Required Profit to get a total. I then have the system add 1p onto this value and then calculate what the profit would be. If it matches my required profit it stops. Otherwise it will keep adding on 1p until it reaches the required level.
Although this works, its now having to do this 6000+ times and its taking a very very long time. Any ideas of a simple way to do it? Hope this is clear, if not please let me know.
Product Cost: £0.222395833333
Delivery Cost: £0.80
Required Profit: £0.40
So far seems simple, but now I need to get a final product cost based on the above figures so at the end we receive 0.40p per order. However, the final figure must also include an additional amount for VAT at 20% plus card processing fees of 2.4% + 0.20p.
For the above example I know the final price should be £2.04 which will give me a breakdown as follows:
Our Cost: £0.222395833333
Shipping Cost: £0.80000
VAT: £0.34
Fees: £0.26936
Total Cost: £1.63175583333
Customer Paid: £2.04
Profit: £0.40824
Any budding mathematicians know how this can be calculated. As it stands, I have programmed our system to add the Product Cost + Delivery Cost + Required Profit to get a total. I then have the system add 1p onto this value and then calculate what the profit would be. If it matches my required profit it stops. Otherwise it will keep adding on 1p until it reaches the required level.
Although this works, its now having to do this 6000+ times and its taking a very very long time. Any ideas of a simple way to do it? Hope this is clear, if not please let me know.
