Remember Me
Log in

Product Price Formula for Magento® 2 (v1.8.1)

Product Price Formula for Magento2
  • Magento® Community 2.0.x, 2.1.x, 2.2.x, 2.3.x
  • Magento® Enterprise 2.0.x, 2.1.x, 2.2.x, 2.3.x
User Guide: Product Price Formula for Magento® 2 User Guide PDF DEMOS
  1. Price dependent on the object dimensions
  2. Multiple items but single Setup Fee
  3. Formula-based Price Matrix
Product Price Formula
Full version for Magento Community Edition
Pack includes:
  • Extension for Magento CE 2.x
  • License key for 1 Magento Website
  • FREE Support
  • Documentation
2.x Community
Full Regular$249.00
Need Installation?
4 months(included)
2CO Buy Now Add to Cart
  • Updates
  • Support
  • Money Back
    60 Days

Have you ever come to a situation when the product price needs a custom mathematical formula based on the product options selected or on the quantity ordered? Create your custom math formula using our Product Price Formula module for Magento® 2.


  • Ability to create complex logical conditions like: if () {} elseif () {} elseif () etc.
  • Ability to create multiple rules and formulas in the same product
  • Full flexible control over the final price via a chain of conditions
  • Conditional branching
  • Ability to use product options within conditions and price formulas
  • Ability to use product attributes within conditions and price formulas
  • Ability to use configurable options. Full support of configurable products
  • Ability to use quantity in conditions and formulas, allows creating custom tier pricing
  • Ability to use math functions like sin(), cos(), sqrt(), pow(), etc.
  • Ability to use custom constants and interim variables NEW
  • Ability to use arrays in formulas NEW
  • Ability to create different formulas for different customer groups or per customer NEW
  • Ability to create different formulas for different store views
  • Ability to limit formulas in time by setting the date range. You can create limited time offers.
  • Ability to apply formula either to the item price or the row total in cart
  • Ability to calculate product's shipping weight based on your custom formula
  • Ability to disallow purchasing the product based on your custom validation criteria (formula or combination of custom options)
  • Ability to copy formulas from one product to multiple ones
  • Ability to export, import, backup formulas via a file
  • Formula applied on category pages, search results, product view, shopping cart, checkout, wishlist, and in other places.


previewpreview preview preview preview preview preview preview preview preview preview preview preview
Calculation based on the object size


  • You need to apply a single setup fee to a bunch of products not depending on the quantity ordered. See the "Setup Fee" DEMO
Multiple products, single setup fee


Price matrix


Math operators and functions

Use the following condition and math operators:

Operator Explanation Example
() Sub condition ( {sku1} + {sku2} ) / PI
+ Addition {sku1} + 10
- Subtraction {sku1} - 10
* Multiplication 2 * PI * {sku_radius}
/ Division {sku1} / 1.5


Math functions:

Function Explanation
abs(x) Returns the absolute value of x
acos(x) Returns the arccosine of x, in radians
asin(x) Returns the arcsine of x, in radians
atan(x) Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians
atan2(y,x) Returns the arctangent of the quotient of its arguments
ceil(x) Returns x, rounded upwards to the nearest integer
cos(x) Returns the cosine of x (x is in radians)
exp(x) Returns the value of Ex
floor(x) Returns x, rounded downwards to the nearest integer
log(x) Returns the natural logarithm (base E) of x
max(x,y,z,...,n) Returns the number with the highest value
min(x,y,z,...,n) Returns the number with the lowest value
pow(x,y) Returns the value of x to the power of y
random() Returns a random number between 0 and 1
round(x) Rounds x to the nearest integer
sin(x) Returns the sine of x (x is in radians)
sqrt(x) Returns the square root of x
tan(x) Returns the tangent of an angle



Constant Explanation
E Returns Euler's number (approx. 2.718)
LN2 Returns the natural logarithm of 2 (approx. 0.693)
LN10 Returns the natural logarithm of 10 (approx. 2.302)
LOG2E Returns the base-2 logarithm of E (approx. 1.442)
LOG10E Returns the base-10 logarithm of E (approx. 0.434)
PI Returns PI (approx. 3.14)
SQRT1_2 Returns the square root of 1/2 (approx. 0.707)
SQRT2 Returns the square root of 2 (approx. 1.414)



Variable Explanation
{configured_price} Price after product options selected
{initial_price} Price before options selected
{price} Price after all calculations applied
{tier_price} Current tier price when QTY changed
{special_price} Special price configured in the product
{attribute_code} Any product attribute name enclosed into {}
{option_sku} Call any product option by its SKU enclosed into {}
{option_sku.qty} The quantity of sub-option if Dynamic Product Options installed
{option_sku.price} Get the price of option by sku
{option_sku.length} Get the length of entered text
{configurable_pid} Returns the ID of currently selected product within the configurable product
{customer_id} The ID of logged in customer. 0 if not logged in.
{qty} Product quantity selected



Customer Reviews

Great tool and great customer service


Great tool. We are testing to rebuild our website in magento. Because we deliver customized products, we were looking for a module with which we could achieve this without having to go to an expensive development agency.

Mission accomplished!

Review by Duth Verfuurden - Nov 16, 2018



The add on module for math calculations is pure genius ! And I cannot say enough about the excellent support we have been given! When you purchase from this company, it is like having the Maytag man behind it (for those of you who are unfamiliar, they stand behind their products 100%)
Thank you !
If we need another addon, we will be back.

Review by Dave4777 - Nov 4, 2018

Must have option for custom pricing and option


Bought the extension together with custom options and this is a must have for users than want to offer customized products.

The custom option allows to offer custom options hide field, show field, set field to show when value is bigger than etc.

The combination with pricing is what we have been looking for, for years. We can make sq. meter pricing width length, discount based on sq. meter and quantity. Add option with fixed price, % or lenght/width x fixed price.

One can go very deep and it took some testing to understand the logic. Once you get it the options are endless.

We had some small bugs, reported them and support is great, there were fixed very fast. Would recommend this module.

Review by Bob - Sep 18, 2018

Another Excellent Extension and More Superior Support


I just submitted a review for Dynamic Product Options, and due to rather complex product option calculations, we also needed to buy Product Price Formula. They work great together. Due to the complexity of some of the formulas required to calculate prices for one of our client's products, Itoris worked closely with us and solved what looked like a daunting number of conditions and provided customization and programming that reduced our development time to a significant degree. We can't thank Itoris enough for support that we feel went well beyond the call of duty for them. We feel fortunate to have found Itoris' products and they will be the first extension developer we go to first to see if they have a product that will meet our needs. So far, the two we have purchased from them have far exceeded our expectations in terms of both product performance and customer support.

Review by WhiteLight Concepts - May 13, 2018

Great extension


We bought some other price calculator extensions first but those didn't work properly in Magento 2.2.3 as they had problems with not working with multiple customer groups and not showing excl. and incl. VAT on the product page. This extension from Itoris looked somewhat intimidating for a math noob like me but I could install it without help. We use it to calculate volume of square table and round table tops.

Review by Nick - Mar 14, 2018

Very powerful


Very powerful extension with many different formula options. We use it together with the Dynamic Product Options extension and it works very well for calculating different quantities/tier prices and options.

Review by Richard - Dec 7, 2017

Write Review
Your Rating: *
Nickname: *
Summary: *
Review: *

Questions & Answers

Questions & Answers

shaul - 1 month ago

Question: Is it possible to update Tier prices for multiple products at the same time (like update attributes function).

ITORIS Team - 1 month ago

Answer: Hi Shaul,

You can't update tier prices directly. But you can create a math formula for your custom tier prices that will work on the Frontend and apply it to multiple products.

Dragos - 1 month ago

Question: I want to know if this module is compatible with Dynamic Product Options for Magento 2.
Can I use both modules on the same product?
I need to build different Custom Options for different Customer Groups.
I already use Product Price Formula for these products.


ITORIS Team - 1 month ago

Answer: Hello Dragos,
Yes, the extensions are fully compatible and can be used together on the same product.
With Dynamic Product Options you can create different option prices for different customer groups.

Bart - 5 months ago

Question: Hi

Is it posibble if I have 3 attributes with prices, module will display lowest one on Price ?

Best Regards

ITORIS Team - 5 months ago

Answer: Hi Bart,
Yes, it is possible. The formula would be: Price = min({attribute1}, {attribute2}, {attribute3})
It will get the lowest attribute of 3. See the list of all math functions at the bottom of

Satoshi - 8 months ago

Question: Hello,
Can you save the custom formula to use in multiple products or do you have to enter manually in each product?
Or can you use a custom formula for each category?

ITORIS Team - 8 months ago

Answer: Hello Satoshi,
The extension has a mass-action to copy formula from one to multiple products at once. Filter products by category on the product grid, select all and choose the product you want to copy formulas from.

Sherry - 10 months ago

Question: Can this extension be used to also display some middle result of price calculation formula? For example, for a product with basic selling unit being a full box (i.e. customer must purchase full boxes where each box contains multiples of single products -- customer is NOT allowed to purchase a fraction of boxes), the customer must enter the "width" and "height" and "quantity" of single products they want, the calculator will first use a formula to calculate the number of full boxes required to contain the required number of single product -- and show at the front end: the number of single products contained in each box AND the number of full box required to make the purchase, and then display a total price using another formula based on this box quantity and values of other product configurable options. Please let me know if you understand this request. Thank you.

ITORIS Team - 10 months ago

Answer: Hello Sherry,
You can calculate the number of full boxes and use it in your formula for the price calculation. But the extension can't display intermediate values on page.
However, you can use the Dynamic Product Options extension to show the detailed calculation to the customer. It allows binding custom JavaScript to product options, so you can display the price breakdown on the page using JS.

Barry - 11 months ago

Question: Hello,
Is is possible to use the 'price' of a custom option as a factor? Eg. a dropdown option for 'package type' with box (price=1) and bottle (price=0.1667) and when selected the base price of the product is multiplied with the factor. (So not added to the base price, but changing the base price)
Can calulcations be added automatically/by default to certain categories and/or product types?

ITORIS Team - 11 months ago

Answer: Hello Barry,
Yes, you can use the custom option price as a multiplier for the base price.
Set the same SKU "package_type" to all sub-options of the dropdown. In this case the variable for your formula would be {package_type.price}. The formula will look like this:

if ( {package_type} ) Price = {initial_price} * {package_type.price}

You can use the mass action available on the product grid to apply the same formula to multiple products.

b - 11 months ago

Question: Can I use this extension to simply increase the cost of a product based on an attribute assignment? For example is 'product attribute a' = true, product price is 10% higher?

I do not want to use custom options to determine price, only a product attribute.


ITORIS Team - 11 months ago

Answer: Hello,
Yes, you can use only attribute in the formula. Example:

if ( {my_attribute} ) Price = {price} * 1.1

ali - 1 year ago

Question: Hi

I'm interesting for this calculator extension, i'm using M2 to build jewelery webstore, is this extension can be used for my website?

Is it possible to try it, and how ?


ITORIS Team - 1 year ago

Answer: Hello,

Yes, you can use the extension for your website. There are other customers already using the price formula extension for jewelry store with success.
We have no trial version for M2 extensions at this time, unfortunately.

Ask Your Question
Nickname: *
Email: * (will not be shown to public)
Question: *

Change Log

+ - new feature
* - bugfix
^ - improvement
- - excluded feature

1.8.1 (2018-11-27)
^ Improved accuracy of calculations for up to 6 digits after the dot
+ Added support of custom options with negative price

1.8.0 (2018-10-09)
+ Added ability to add constants and custom variables
+ Added ability to use arrays in formulas

1.7.4 (2018-09-07)
* Fixed issue tax calculation if price already includes tax
* Fixed issue with tier prices of configurable products

1.7.3 (2018-04-02)
* Fixed issue with duplicating product (formulas were not copied)

1.7.2 (2018-03-22)
+ Added possibility to create different formulas for different customers via variable {customer_id}

1.7.1 (2018-02-26)
* Fixed issue with customer groups saving on Magento 2.2

1.7.0 (2017-12-26)
+ Added possibility to created different price formulas for different store views

1.6.6 (2017-12-20)
* Fixed issue with calculation based on color swatches of configurable product

1.6.5 (2017-12-08)
^ Removing roundings in calculation to provide a more precise final price
* Fixed error in wishlist for products having formula
* Fixed row total in cart for multi-currency Magento setup
* Fixed issue with tax calculation if tax is already added in price and in cart's subtotal

1.6.4 (2017-11-01)
* Fixed issue variable {configurable_pid} if product configured by a single attribute
^ Added compatibility with the Grouped Promotions extension

1.6.3 (2017-10-11)
* Fixed issue with saving custom validation criteria

1.6.2 (2017-09-29)
^ Added compatibility with Magento 2.2

1.6.1 (2017-09-27)
^ Skipping calculations if no active formula available for product

1.6.0 (2017-08-31)
+ Calculating product prices on category pages too
* Fixed attribute conflict of variable {tier_price}
^ Added support of international money formats like X,XXX.XX and X.XXX,XX

1.5.7 (2017-08-10)
+ Added variable {tier_price} that returns the current tier price based on quantity selected
^ Improved JavaScript selector for the priceBox on the page

1.5.5 (2017-07-18)
+ Added ACL for the Product Price Formula section in STORES -> Configuration

1.5.4 (2017-06-21)
* Fixed final price calculation if the base price already includes tax
^ Added compatibility with Magento's REST API

1.5.3 (2017-04-28)
^ Fixed tax rate calculation if product's initial price is 0
^ Enabled formula calculation for products having no custom options (if formula relies on product attributes only)

1.5.2 (2017-04-06)
* Fixed issue final price display if multiple price boxes are available on the page

1.5.1 (2017-02-20)
* Fixed issue with formula deletion on M2.1.4

1.5.0 (2017-01-17)
^ Updating product prices using formulas in wishlist

1.4.0 (2016-11-24)
+ Added mass action to copy formulas from one product to multiple ones in bulk
+ Added possibility to export/import price formulas via a file
* Fixed issue with price calculation for formulas having brackets

1.3.6 (2016-10-31)
^ Updated formula validation in backend for Magento 2.1.2+

1.3.5 (2016-09-20)
* Fixed text length calculation through variable {sku.length}
* Fixed issue with saving formula for multiple groups in Magento 2.1

1.3.4 (2016-08-24)
* Fixed issue with DB table prefix
* Fixed issue with XML parser for PHP7
* Fixed issue with saving custom validation messages in Magento 2.1

1.3.3 (2016-08-12)
* Fixed issue with variable {initial_price} when product price is displayed with tax on the product view

1.3.2 (2016-08-09)
* Fixed issue with calculating price in shopping cart with multiple formulas in the same product

1.3.1 (2016-07-29)
* Fixed issue with the initial product price

1.3.0 (2016-07-11)
^ Improved source code to Magento code standards
* Fixed issue with tax calculation in cart

1.2.1 (2016-06-23)
* Fixed issue with duplicated price in cart totals for configurable products

1.2.0 (2016-06-23)
^ Added compatibility with Magento 2.1

1.1.0 (2016-06-16)
+ Added possibility to get the price of option using variable {option_sku.price}
+ Added possibility to get the length of entered text using variable {option_sku.length}
* Fixed JS error on frontend if variable used in the weight formula or in the validation formula only
* Fixed JS error on frontend if price displayed with and without tax at the same time

1.0.3 (2016-05-12)
* Fixed incorrect calculation for radio/checkboxes having additional price

1.0.2 (2016-04-26)
^ Added compatibility with Dynamic Product Options
+ Added possibility to feed sub-options QTY via variable {optionSku.qty} if Dynamic Product Options installed
* Fixed issue with the totals calculation in cart
* Fixed issue with the date range if set in the formula config

1.0.1 (2016-04-20)
* Fixed "add to cart" action for configurable products

1.0.0 (2016-04-15)
+ Extension released

risk free
Risk-Free Investment
No risk at all. 60-day money back guarantee.
simple licensing
Simple Licensing
One license per one Magento® installation. No store, website, or domain limitation. No monthly or hidden fees.
Try before purchasing
Free Lifetime Updates
Never pay for updates! Simply download the latest version of your favorite extension from our website when you need it.
Free Installation Service
Free Installation Service
Contact Us and we will help you install our extensions absolutely for FREE.
full open source
Full Open Source
No obfuscation, no encryption. Only Full Open Source extensions. Ideal for customizations.
Following Magento Standards
Following Magento® Standards
All our extensions are written following Magento® code standards.
Professionally Tested Modules
Professionally Tested Modules
We do our best to keep quality of our extensions: performance, functional, and cross-browser testing.
Comprehensive Documentation
Comprehensive Documentation
Detailed documentation for all extensions is available online and in PDF. Forum and FAQs.
Outstanding Support
Outstanding Support
Free and friendly EST time support. Help, tips & tricks, and even small customizations will be provided.
Long Term Strategy
Long Term Strategy
8+ years in eCommerce. We grow to provide you even better services and extensions, and are always open to customers' suggestions.