# Cost basis on margin reports

Breww's margin reports normally cost each sale at the **actual** cost Breww recorded when the stock was dispatched, worked out from the batch it came from. The **Cost basis** option lets you cost sales against the [target costs](https://breww.com/docs/target-costs/) you've set for each beer instead, either for every sale or only where Breww has no actual cost to use.

This is useful if you want to see margin against what your beer *should* cost rather than what one particular batch happened to cost, or if you sell through Breww without costing your batches in Breww, in which case actual costs come through as zero and the margin reports would otherwise show your full sale value as margin.

## Where you'll find it

The **Cost basis** option sits directly below the date range at the top of each of these reports, under **Reporting** → **Sales**:

- **Margin by product**
- **Margin by customer**
- **Margin by customer type**
- **Margin by customer and product**
- **Margin by invoice**
- **Sales by sales person**

## Choosing a cost basis

| Option                                                                  | What it does                                                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Actual costs**                                                        | Costs every sale at the actual cost Breww recorded when the stock was dispatched. This is the default and is exactly what the reports showed before the option existed.                                                                                                          |
| **Target costs**                                                        | Costs every sale of a beer product at its target cost, ignoring what the batch actually cost. Sales with no target available keep their actual cost.                                                                                                                             |
| **Actual costs, using target costs for batches with no recorded costs** | Keeps your actual costs and only switches to target for sales where Breww recorded no production or packaging cost at all, for example because the batch had no costs entered when the stock was dispatched, or because you started costing batches part way through the period. |

The other options on each report, such as returned products, credit notes, additional costs and stock transfer orders, work the same way whichever cost basis you choose.

## Which target is used

Target costs are versioned by date, so each sale is costed at the revision that was in force on the **issue date of its invoice**. A report that spans a scheduled cost change uses the old target for the earlier sales and the new target for the later ones, and running last year's report again today still gives last year's figures.

For each sale, Breww works out a target cost from:

- the beer's **liquid** target, multiplied by the volume of liquid in the product, and
- the **packaging** target for the product's container type, or for its packaging format where you've set one.

A multipack uses the target set on its packaging format if there is one, otherwise it inherits the container type's target, exactly as on the target costs page. See [Target costs](https://breww.com/docs/target-costs/) for how targets are structured and how to set them.

Part-filled casks and kegs use the volume actually recorded on the order line for the liquid part, so a half-filled cask is costed as half a cask of liquid. The packaging target is still applied for the full container.

> Note: A sale switches to target costs only when every beer in the product has a liquid target in force on the invoice date. If a beer has a liquid target but no packaging target for that container type, the packaging part of the target is zero, so it's worth setting a packaging target for every container type you sell.

## What always stays at actual cost

Target costs cover the liquid and packaging of beers you package, so some figures never change basis:

- **Duty** is always the duty Breww calculated for each sale, whichever cost basis you choose.
- **Products with no beer in them**, such as merchandise, services and other stock item products, always use their actual cost, because targets are set per beer.
- **Any beer with no liquid target** in force on the invoice date keeps its actual cost. In a mixed pack, if any beer in the pack has no liquid target, the whole line stays at actual cost.

A sale is never split between the two: its production and packaging costs always come from the same basis.

## Reading the results

When you choose a basis other than **Actual costs**, the cost column headings say so, both on screen and in exports:

- **Target costs** adds "(target)", for example "Production costs (target)" and "Packaging costs (target)".
- **Actual costs, using target costs for batches with no recorded costs** adds "(actual or target)".

On the **Sales by sales person** report, which shows a single cost figure, the suffix appears on the **Total cost** column instead.

No extra columns are added. The total cost, margin and margin percentage columns all follow whichever basis you chose.

## Related

- [Target costs](https://breww.com/docs/target-costs/) - how to set and schedule targets for each beer.
- [COGS vs target report](https://breww.com/docs/cogs-vs-target-report/) - compare what your batches actually cost against target, batch by batch.
- [How are batch costings and WIP value calculated in Breww?](https://breww.com/docs/batch-costings-and-wip-value/) - where the actual costs come from.
