All CollectionsStock
Understanding Moving Average Cost (MAC)
Understanding Moving Average Cost (MAC)

Gain a better understanding of how Average Cost works

Written by Dayvid Lorbiecke
Updated over a week ago

Understanding the Moving Average Cost (MAC) in Katana is essential for accurate inventory valuation. The MAC calculates the average unit cost after each purchase by dividing the total stock value by the quantity in stock, ensuring a fair and accurate representation of inventory costs. This method adjusts dynamically with each transaction, providing a continual update to stock valuation.

Katana uses the Moving Average Cost method for inventory costing. Other inventory costing methods such as First-in-first-out (FIFO) or Last-in-first-out (LIFO) are not supported.

The Moving Average Cost refers to the current average cost of an item In stock. The number is calculated from the item's Value of stock divided by the quantity In stock. It is a perpetual inventory system where, after each acquisition, the average unit cost is recalculated by adding the cost of acquired units to the cost of units in inventory and dividing by the new total number of units.

In Katana, it's easiest to way to understand how this works is to look at a variant's inventory intel.

### Example:

1. You purchase 10pcs of material X for \$10 per unit. The total Value of stock is \$100, and the Average cost is \$10 per unit.

1. Total stock value: 10 pcs x \$10 = \$100

2. Unit cost: \$100 / 10 pcs = \$10

2. You then purchase another 5pcs of material X for \$13 per unit. The total Value of stock is now \$165 and the Average cost is 165 / 15 = \$11 per unit.

1. Purchased stock value: 5pcs x \$13 = \$65

2. Total stock value: \$100 + \$65 = \$165

3. Total stock: 10 pcs + 5 pcs = 15 pcs

4. Unit cost: \$165 / 15 pcs = \$11

3. Then, if you use 8 pcs of material X to manufacture product Y, the Average cost will not change for material x. In the Product recipe for product Y, the cost of material X per unit will be \$11.

1. Used stock value: 8 pcs x \$11 = \$88

2. Total stock value: \$165 - \$88 = \$77

3. Total stock: 15 pcs - 8 pcs = 7 pcs

4. Unit cost: \$77 / 7 pcs = \$11

### Locations

A variant's MAC is calculated based on location. This means that the same material or product can have a different MAC for each location. These differences come from various reasons, such as differing purchase prices for materials, varying manufacturing costs, etc. Keeping the moving average cost calculation separate means that each location in Katana can maintain independent accounting numbers.

# Moving average cost and past document changes

Document changes that affect stock can only be done during open inventory periods. Read more about Inventory period closing. Any change triggers a recalculation of stock movements for the variant and any variant connected to it.

In situations that require changing the moving average cost of a variant, it's best to make two stock adjustments. The first is to adjust the stock balance to zero, meaning the stock with an existing MAC is erased from Katana. Afterward, create a positive stock adjustment to bring the quantity back to stock with the desired unit cost on the stock adjustment document. You can also achieve the same result by updating stock levels and stock values via import.

# What can affect moving average cost?

MAC is affected by every transaction related to the input prices of products - acquiring materials and products (purchasing and positive stock adjustments) and manufacturing. Any incoming stock movements can affect the MAC, but outgoing stock movements won't (as they use the existing MAC for the outgoing movement).

Transactions that affect stock levels:

• Sales and purchases, stock transfers, stock adjustments, and manufacturing. (Not all of these actions affect MAC).

Transactions that don't affect moving average cost:

• Transactions that result in stock departing, including sales, negative stock adjustments, stock transfer for the origin location, and materials used in manufacturing.

NOTE: Using the MAC methodology means that the total cost of the entire stock in a location is divided equally between units, and the MAC is recalculated when new stock is added. Any outgoing stock transaction will use the MAC since all units of the same variant have the same unit cost.

Transactions that do affect moving average cost:

• Purchases with different prices -
Different purchase prices are the main aspect that affects the MAC of materials.

โ