# Ingredient batch cost allocation

When adding stock items to an ingredient batch, such as a yeast batch, you are able to choose between two cost allocation methods. To help you choose which is best for you, we've outlined how the calculations are made below.

Both methods begin in the same way, by calculating a base cost to allocate each time based on the total cost and the expected usage number. For example, let's say that we have bought some yeast for **£1,000**. We're expecting to be able to pitch and re-crop it **ten** times. This means that the base cost to allocate each time is **£1,000 / 10 = £100**.

Whilst we are simply cropping the yeast and repitching back into a single other beer batch, both methods will simply allocate **£100** of the cost to each beer batch. Both methods would allocate the costs as shown below:

```mermaid
graph TB
    id1("Batch started") --> ida171("FV4<br>1 L<br>Generation 1")
    sra39("1 kg of Safale American<br>£1,000.00") --> id1
    ida171 --> |"Added to Batch #1034<br>+£100.00"| ida5929("FV2<br>1 L<br>Generation 1")
    linkStyle 2 stroke:darkred,stroke-width: 4px,color:darkred
```

The difference comes when we **split** the cropped yeast, using a single crop amongst multiple beer batches.

### Evenly distribute each use at the same cost (recommended)

With this method, Breww will treat **each split** (which appear as branches on the usage tree) as a single whole usage for the purposes of the **Expected usage**. It will therefore allocate the full **£100** to each beer batch's costs, as shown below:

```mermaid
graph TB
    id1("Batch started") --> ida171("FV4<br>1 L<br>Generation 1")
    sra39("1 kg of Safale American<br>£1,000.00") --> id1
    ida171 --> |"Added to Batch #1034<br>+£100.00"| ida5929("FV2<br>1 L<br>Generation 1")
    ida5929 --> |"Extracted from Batch #1034"| ida5930("FV4<br>10 L<br>Generation 2")
    ida5930 --> |"Added to Batch #1027<br>+£100.00"| ida5931("FV6<br>6 L<br>Generation 2")
    ida5930 --> |"Added to Batch #1029<br>+£100.00"| ida5935("FV8<br>4 L<br>Generation 2")
    linkStyle 4 stroke:darkred,stroke-width: 4px,color:darkred
    linkStyle 5 stroke:darkred,stroke-width: 4px,color:darkred
```

### Split costs between branches based on the volume used

The split method will instead treat repitching the yeast into multiple beer batches as a single usage that is now split between multiple "branches". It will split the single usage base cost of **£100** and split it proportionally between each branch.

```mermaid
graph TB
    id1("Batch started") --> ida171("FV4<br>1 L<br>Generation 1")
    sra39("1 kg of Safale American<br>£1,000.00") --> id1
    ida171 --> |"Added to Batch #1034<br>+£100.00"| ida5929("FV2<br>1 L<br>Generation 1")
    ida5929 --> |"Extracted from Batch #1034"| ida5930("FV4<br>10 L<br>Generation 2")
    ida5930 --> |"Added to Batch #1027<br>+£60.00"| ida5931("FV6<br>6 L<br>Generation 2")
    ida5930 --> |"Added to Batch #1029<br>+£40.00"| ida5935("FV8<br>4 L<br>Generation 2")
    linkStyle 4 stroke:darkred,stroke-width: 4px,color:darkred
    linkStyle 5 stroke:darkred,stroke-width: 4px,color:darkred
```
