Title: custom formula
Last modified: February 17, 2020

---

# custom formula

 *  Resolved [Pantomas](https://wordpress.org/support/users/pantomas/)
 * (@pantomas)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-formula/)
 * Hello,
 * i have problems with a custom formula – i have 2 number-fields labeled with length
   and height – the values fromt he fields i want to multiply with each other ( 
   to get square centimeters ) and muliply the result with different factors to 
   get different prices the bigger the numbervalues are. This formula i have:
 * (({field.wcpa-number-1581519556001.value}*{field.wcpa-number-1581519634205.value})
   >500?({field.wcpa-number-1581519556001.value}*{field.wcpa-number-1581519634205.
   value})*10:({field.wcpa-number-1581519556001.value}*{field.wcpa-number-1581519634205.
   value})>1000?({field.wcpa-number-1581519556001.value}*{field.wcpa-number-1581519634205.
   value})*15:0)
 * when i enter numbers that result under 1000 then it works but if i enter numbers
   that result over 1000 then it still multiplys with 10 instead 15.
    i set up the
   formula in a paragraph-field.
 * greets Jan
    -  This topic was modified 6 years, 3 months ago by [Pantomas](https://wordpress.org/support/users/pantomas/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [ashin_acowebs](https://wordpress.org/support/users/ashinacowebs/)
 * (@ashinacowebs)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-formula/#post-12463050)
 * Hi,
 * Please look at the example we have created for you
    Product: [https://wcpa.demo.acowebs.com/product/custom-formula-for-pantomas/](https://wcpa.demo.acowebs.com/product/custom-formula-for-pantomas/)
 * Form: [https://wcpa.demo.acowebs.com/wp-admin/post.php?post=5442&action=edit](https://wcpa.demo.acowebs.com/wp-admin/post.php?post=5442&action=edit)
 * We have used the formula like this: `(({field.wcpa-number-1581519556001.value}*{
   field.wcpa-number-1581519634205.value}>1000)?({field.wcpa-number-1581519556001.
   value}*{field.wcpa-number-1581519634205.value}*15):({field.wcpa-number-1581519556001.
   value}*{field.wcpa-number-1581519634205.value}>500)?({field.wcpa-number-1581519556001.
   value}*{field.wcpa-number-1581519634205.value})*10:0)`
 * Please try like this
    Thank you.
 *  [ashin_acowebs](https://wordpress.org/support/users/ashinacowebs/)
 * (@ashinacowebs)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-formula/#post-12489802)
 * As we haven’t heard back from you further, we assume that this issue has been
   resolved at your end and considering this ticket as closed. Please don’t hesitate
   to get back to us if you require any further assistance or clarifications from
   our end in the future. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘custom formula’ is closed to new replies.

 * ![](https://ps.w.org/woo-custom-product-addons/assets/icon-256x256.gif?rev=3328656)
 * [Product Addons for Woocommerce - Product Options with Custom Fields](https://wordpress.org/plugins/woo-custom-product-addons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-custom-product-addons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-custom-product-addons/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-custom-product-addons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-custom-product-addons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-custom-product-addons/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ashin_acowebs](https://wordpress.org/support/users/ashinacowebs/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/custom-formula/#post-12489802)
 * Status: resolved