# Price calculation

Stockeo gives you a possibility to update product prices based on the supplier feed.

Add the Price field in the Data Mapping section, and specify which column/node contains prices in the supplier feed.

You can also calculate prices according to your needs. Click on the gear icon to define a price formula in Liquid.

The available variables are

`price`

- the feed price`sku`

- the feed SKU`quantity`

- the feed quantity, available if added to data mapping`cost`

- the product cost as in the feed, available if added to data mapping`variant.price`

- the current variant price in Shopify (before update)

You can use all the standard Liquid math filters to perform calculations.

Use the

`plus`

filter to add a number.{{ price | plus: 3 }}

Use the

`minus`

filter to subtract a number.{{ price | minus: 1 }}

Use the

`times`

filter to multiply price by a given number.{{ price | times: 1.2 }}

Use the

`divided_by`

filter to divide price by a given number.{{ price | divided_by: 1.2 }}

Use the

`round`

filter to round the price to the nearest integer or to the specified number of decimals.Formula | Feed Price | Result |
---|---|---|

`{{ price | round }}` | 4.32 | 4.00 |

`{{ price | round }}` | 4.56 | 5.00 |

`{{ price | round: 1 }}` | 4.44 | 4.40 |

`{{ price | round: 1 }}` | 4.68 | 4.70 |

Use the

`ceil`

filter to round the price up to the nearest integer.Formula | Feed Price | Result |
---|---|---|

`{{ price | ceil }}` | 4.32 | 5.00 |

`{{ price | ceil }}` | 4.56 | 5.00 |

Use the

`floor`

filter to round the price down to the nearest integer.Formula | Feed Price | Result |
---|---|---|

`{{ price | floor }}` | 4.32 | 4.00 |

`{{ price | floor }}` | 4.56 | 4.00 |

Use the

`at_least`

filter to limit prices to a minimum value.Formula | Feed Price | Result |
---|---|---|

`{{ price | at_least: 5}}` | 2.34 | 5.00 |

`{{ price | at_least: 5 }}` | 5.67 | 5.67 |

You can combine the standard math filters to achieve more price-specific rounding.

Use the following formula to round prices up to the nearest .99

{{ price | ceil | minus: 0.01 }}

If a price is already a whole number, then the formula will still subtract one cent. If you prefer to keep whole prices as they are, and only round up fractions to .99, then use the following formula.

{{ price | ceil | minus: 0.01 | at_least: price }}

Formula | Feed Price | Result |
---|---|---|

`{{ price | ceil | minus: 0.01 }}` | 12.34 | 12.99 |

`{{ price | ceil | minus: 0.01 }}` | 12.00 | 11.99 |

`{{ price | ceil | minus: 0.01 | at_least: price}}` | 12.34 | 12.99 |

`{{ price | ceil | minus: 0.01 | at_least: price}}` | 12.00 | 12.00 |

Last modified 3mo ago