> For the complete documentation index, see [llms.txt](https://docs.pakk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pakk.io/products-and-inventory/gross-margin-calculation-and-control/margin-calculations.md).

# Margin Calculations

Margin calculations are presented in two ways:

* **Basic margin calculations**: These are based on the general sell price of the item and the target margin (either the account default or product-overriden value). Note that any bulk pricing brackets are essentially ignored for this calculation.
* **Per-site margin calculations**: These are based on the price that the item sells for **on that site**. The price on that site may be different from the base sell price of the product either as a result of site pricing override or a pricing scheme being in effect on that site. If target margin has been overriden for that site (in the Site settings) then that will be used, otherwise the product/account default will be used.

Here’s an outline of what each of the margin calculation metrics means:

| Term                    | Description                                                                                                                    |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Total Variable Costs    | The sum of all the calculations specified by the variable cost matrix.                                                         |
| Total Unit Cost         | The total variable costs added to the purchase price in the base currency of the product.                                      |
| Unit Profit             | The difference between the selling price and the total unit cost.                                                              |
| Gross Margin            | The percentage of the sell price that corresponds to profit.                                                                   |
| Gross Markup            | Another way of thinking about margin that some prefer. This is the ratio of sell price to unit cost expressed as a percentage. |
| Gross Markup Multiplier | An alternative way of expressing markup that some prefer. Instead of a percentage, this is simply a multiplier.                |
| Target Margin           | A record of the target margin used (either from the account default or product override or website override).                  |
| Target Price            | The price you would have to sell the product at in order to achieve the target margin with all variable costs factored in.     |
| Margin Classification   | Either 'losing money', 'below target', or 'above target', indicating the profitability status based on the margin.             |

#### Example Calculation <a href="#example-calculation" id="example-calculation"></a>

* Purchase a product for £2
* Total variable costs of £1
* Sell the product for £9
* Total unit cost is £3
* Unit profit is £6
* Gross margin is 66%
* Markup multiplier is 3
* Markup percentage is 200%
* If target margin is 100%, target price is £6
* Therefore the margin classification is ‘above target’

### When are margin calculations updated? <a href="#when-are-margin-calculations-updated" id="when-are-margin-calculations-updated"></a>

Margin calculations for products are updated in the following circumstances:

* You edit a product: that product's margin calculations are updated
* You add a new exchange rate / edit an existing exchange rate: products who have a preferred supplier with the affected currency have their margin calculations updated
* You change margin calculation defaults at account level: all products' margin calculations are updated
* You change target margin override on a website: products that are active on that website have their margin calculations updated

### What about composites? <a href="#what-about-composites" id="what-about-composites"></a>

* The purchase price used in the margin calculations is the sum of the purchase price in base currency of the composite members in the correct proportions.
* All other variable costs are derived in exactly the same way as for normal products, using the variable cost matrix. i.e. the system does not attempt to 'combine' or 'add' variable costs from the composite members.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pakk.io/products-and-inventory/gross-margin-calculation-and-control/margin-calculations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
