WooCommerce Product Price by Formula

WooCommerce Product Price by Formula

Set formula for automatic WooCommerce product price calculation


WooCommerce Product Price by Formula module lets you set formula for automatic WooCommerce product price calculation. Best way to explain how this module works, is to examine an example. Let’s say you want to automatically calculate final product price: you have product which purchase cost is x and you always pay $10 fee when buying it. You also want to add 50% profit margin to the final price. In that case the formula for final price calculation would be (x + 10) * 1.50.

You can set one formula for all products:
WooCommerce Product Price by Formula - Admin Settings

After that you need to visit product’s edit page, and enable price by formula calculation for current product:
WooCommerce Product Price by Formula - Admin per Product Settings

Then you set default WooCommerce product price to x (e.g. 100), and final price on the frontend is changed according to the formula you set earlier (e.g. (100 + 10) * 1.50 = $165):
WooCommerce Product Price by Formula - Frontend

Accessible through:
  • WooCommerce > Settings > Booster > Prices & Currencies > Product Price by Formula
Tested on WooCommerce 3.3.1 and WordPress 4.9.4
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply



  1. Suresh June 24, 2016 at 2:22 am #

    how to calculate this ? can you share some example to do this? is there any proper documentation

    Reply to thread

  2. Hemal Patel June 28, 2016 at 3:07 pm #

    How to use percentage in this formula ? Basically i want to add Some percentage as admin fees and add shipping charges to base price ,so how will i use this type of formula?

    Reply to thread

  3. Tuby February 6, 2017 at 4:41 pm #


    Our offer is: if you buy 3 Products , the product, which cost low is again reduced to 50%.
    How to calculate this ?

    Reply to thread

  4. Neil Jones June 13, 2017 at 2:43 am #


    This is a great feature but I think it could be better if you could link it with your product cost of goods module as the base price for the formula from that field.

    Hope it helps.

    Reply to thread

  5. Mac September 2, 2017 at 12:02 pm #

    I will like to see the round up feature so formula prices are rounded to the nearest hundred. E.g 19,925 rounded to 19,900

    Reply to thread

    • Mac September 2, 2017 at 12:44 pm #

      I understand the formula and variable can be overwritten for each product;

      But It’ll be great if just the formula can be edited for each product and each variable obtainable (called) from module setting.
      In this case when a particular variable is changed in module settings it only affects products with that variable in their fomula.

  6. Aashif October 7, 2017 at 5:59 am #

    My formula is x+p1. The value of p1 is 10. After substituting 100 in place of x the final price preview is showing 0.00 instead of 110 and the frontend is unable to display the price. Please provide solution to solve this.

    Reply to thread

  7. Charles Lamb November 29, 2017 at 12:03 am #

    This formula is a good idea but I need to be able to test my profit after calculating a new price. For this there would need to be some if/then/while support to allow iterative calulations based on various tests. Also being able to add parameters that are product fields/variables would be useful. For example an Ebay final value fee is based on 10% of selling price and I dont know the selling price until after your formula has completed. Also can a parameter value be a formula?

    I would pay for this functionality…… can you offer it?

    Reply to thread

  8. Martin December 3, 2017 at 9:43 pm #

    I am trying to get the product price by formula option to work for me, Could you tell me if the following problem is solvable with this?

    I sell carpets, a product is priced at £10 per sq meter, however it comes on a 4 Metre roll

    If someone buys 2.5 x 4 (10m2) it would cost £100.

    I was thinking the usual price of 10 * 4 with the customer entering in the length of 2.5 in P1??

    Please help, is it maybe not possible with this plugin??

    Many thanks in advance

    With a P1 (length) user defined would work but its saying

    Reply to thread

  9. Juan January 25, 2018 at 8:11 pm #

    Is it possible to use a product variable/attribute in the formula? I need to calculate the price according to the weight of the product. The product price field shows the per kg price. If the products weights 3kgs, the final calculated price should be (price per kg)*3

    Reply to thread