Skip to main content

Group Average Cost Calculation

Understanding exactly how NetSuite calculates Group Average Cost is essential for accurate inventory valuation and financial reporting.


The Formula​

Group Average Cost Formula
═══════════════════════════════════════════════════════════════════════════════

Total Inventory Value (All Locations)
Group Average Cost = ─────────────────────────────────────────
Total Quantity on Hand (All Locations)


Expanded:

Σ (Location₁ Value + Location₂ Value + ... + Locationₙ Value)
GAC = ─────────────────────────────────────────────────────────────────────
Σ (Location₁ Qty + Location₂ Qty + ... + Locationₙ Qty)

Step-by-Step Calculation​

Initial State​

Starting Point - No Inventory
═══════════════════════════════════════════════════════════════════════════════

Item: WIDGET-A
Locations: Main Warehouse, East DC, West DC

All locations: 0 qty, $0 value
Group Average Cost: N/A (no inventory)

Receipt 1: Main Warehouse​

Transaction: Purchase Receipt #1
═══════════════════════════════════════════════════════════════════════════════

Receipt at Main Warehouse: 100 units @ $10.00

CALCULATION:
─────────────────────────────────────────────────────────────────────────────

Location Qty × Cost = Value
──────────────────────────────────────────────────────
Main Warehouse 100 $10.00 $1,000.00
East DC 0 - $0.00
West DC 0 - $0.00
──────────────────────────────────────────────────────
TOTAL 100 $1,000.00

Group Average Cost = $1,000.00 / 100 = $10.00

─────────────────────────────────────────────────────────────────────────────

RESULT:
┌─────────────────────────────────────────┐
│ Group Average Cost = $10.00 │
│ All locations use this cost │
└─────────────────────────────────────────┘

Receipt 2: East DC (Different Price)​

Transaction: Purchase Receipt #2
═══════════════════════════════════════════════════════════════════════════════

Receipt at East DC: 50 units @ $14.00

BEFORE:
Total Qty: 100 units
Total Value: $1,000.00
Group Avg: $10.00

NEW RECEIPT:
50 units × $14.00 = $700.00

CALCULATION:
─────────────────────────────────────────────────────────────────────────────

Location Qty × Cost = Value
──────────────────────────────────────────────────────
Main Warehouse 100 $10.00 $1,000.00
East DC 50 $14.00 $700.00 ← NEW
West DC 0 - $0.00
──────────────────────────────────────────────────────
TOTAL 150 $1,700.00

Group Average Cost = $1,700.00 / 150 = $11.3333...

─────────────────────────────────────────────────────────────────────────────

RESULT:
┌─────────────────────────────────────────┐
│ Group Average Cost = $11.33 │
│ (Rounded to 2 decimal places) │
└─────────────────────────────────────────┘

IMPORTANT: Main Warehouse inventory is now ALSO valued at $11.33
Even though it was purchased at $10.00!

Receipt 3: West DC (Another Price)​

Transaction: Purchase Receipt #3
═══════════════════════════════════════════════════════════════════════════════

Receipt at West DC: 75 units @ $12.00

BEFORE:
Total Qty: 150 units
Total Value: $1,700.00 (revalued)
Group Avg: $11.33

NEW RECEIPT:
75 units × $12.00 = $900.00

CALCULATION:
─────────────────────────────────────────────────────────────────────────────

Location Qty Value (Current)
──────────────────────────────────────────────────────
Main Warehouse 100 $1,133.00 (100 × $11.33)
East DC 50 $566.50 (50 × $11.33)
West DC 75 $900.00 (75 × $12.00) ← NEW at receipt cost
──────────────────────────────────────────────────────
TOTAL 225 $2,599.50

Group Average Cost = $2,599.50 / 225 = $11.5533...

─────────────────────────────────────────────────────────────────────────────

RESULT:
┌─────────────────────────────────────────┐
│ Group Average Cost = $11.55 │
└─────────────────────────────────────────┘

When Recalculation Occurs​

Triggers for Recalculation​

Transaction TypeTriggers Recalc?Details
Purchase ReceiptYesNew inventory at purchase price
Item ReceiptYesReceiving against PO
Vendor Bill (3-way)YesIf price differs from receipt
Inventory Adjustment (+)DependsOnly if cost specified
Inventory Adjustment (-)NoUses current average
Assembly BuildYesComponents consumed, assembly received
Work Order CompletionYesWIP transferred to finished goods
Transfer OrderNoNo cost change (same company)
Sale/FulfillmentNoUses current average
Return (Customer)NoReturns at current average
Return (Vendor)NoRemoves at current average

Recalculation Timing​

Cost Engine Processing
═══════════════════════════════════════════════════════════════════════════════

Transaction Posted
│
▼
┌─────────────────────┐
│ Queue for Costing │
│ Engine Processing │
└─────────┬───────────┘
│
▼
┌──────────────┐
│ Cost Engine │ ◄─── Runs hourly (configurable)
│ Process │
└──────┬───────┘
│
├──► Recalculate affected items
│
├──► Update inventory values
│
├──► Generate GL adjustments
│
└──► Mark transaction as costed

Note: Group Average recalculation happens during Cost Engine runs,
not immediately upon transaction save.

Calculation Examples​

Example 1: Multiple Receipts, One Sale​

Complete Transaction Sequence
═══════════════════════════════════════════════════════════════════════════════

STEP 1: Receipt at Location A - 100 @ $10
────────────────────────────────────────────
Before: 0 qty, $0 value
Receipt: 100 × $10 = $1,000
After: 100 qty, $1,000 value

Group Avg = $1,000 / 100 = $10.00

STEP 2: Receipt at Location B - 60 @ $15
────────────────────────────────────────────
Before: 100 qty, $1,000 value, Avg $10.00
Receipt: 60 × $15 = $900
After: 160 qty, $1,900 value

Group Avg = $1,900 / 160 = $11.875 → $11.88

STEP 3: Sale from Location A - 40 units
────────────────────────────────────────────
Before: 160 qty, $1,900.80 value (160 × $11.88)
Sale: 40 × $11.88 = $475.20 (COGS)
After: 120 qty, $1,425.60 value

Group Avg = $11.88 (unchanged - sales don't recalc)

STEP 4: Receipt at Location A - 80 @ $13
────────────────────────────────────────────
Before: 120 qty, $1,425.60 value, Avg $11.88
Receipt: 80 × $13 = $1,040
After: 200 qty, $2,465.60 value

Group Avg = $2,465.60 / 200 = $12.328 → $12.33

═══════════════════════════════════════════════════════════════════════════════

FINAL STATE:
Location A: 140 units @ $12.33 = $1,726.20
Location B: 60 units @ $12.33 = $ 739.80
TOTAL: 200 units = $2,466.00

Example 2: Assembly Build Impact​

Assembly Build with Group Average
═══════════════════════════════════════════════════════════════════════════════

Assembly Item: FINISHED-PRODUCT
Components Required:
- 2 × COMPONENT-A (Group Avg: $5.00)
- 3 × COMPONENT-B (Group Avg: $8.00)
- 1 × COMPONENT-C (Group Avg: $12.00)

BUILD: 10 assemblies

COMPONENT CONSUMPTION:
────────────────────────────────────────────
Component-A: 20 units × $5.00 = $100.00
Component-B: 30 units × $8.00 = $240.00
Component-C: 10 units × $12.00 = $120.00
─────────────────────────────────────────
Total Component Cost: $460.00

ASSEMBLY RECEIVED:
────────────────────────────────────────────
10 × FINISHED-PRODUCT received

Cost per Assembly = $460.00 / 10 = $46.00

If FINISHED-PRODUCT already had inventory:
────────────────────────────────────────────
Before: 25 units @ $44.00 = $1,100.00
Build: 10 units @ $46.00 = $ 460.00
After: 35 units = $1,560.00

New Group Avg = $1,560 / 35 = $44.57

Precision and Rounding​

NetSuite Rounding Rules​

Rounding Behavior
═══════════════════════════════════════════════════════════════════════════════

Standard Rounding: 2 decimal places for currency

Example Calculation:
Total Value: $1,700.00
Total Qty: 150

Exact: $1,700 / 150 = $11.333333...
Rounded: $11.33

Rounding Variance:
150 × $11.33 = $1,699.50
Actual value: $1,700.00
Variance: $0.50 (absorbed in rounding)

This small variance is normal and typically immaterial.

Extended Precision Settings​

Some NetSuite accounts allow extended precision:

SettingDecimal PlacesUse Case
Standard2Most businesses
Extended4-6High-volume, low-margin items
Quantity0-6Depends on unit of measure

Edge Cases​

Zero Quantity Scenarios​

What Happens When Quantity Reaches Zero?
═══════════════════════════════════════════════════════════════════════════════

Scenario: Sell all inventory

Before: 100 units @ $10.00 = $1,000
Sale: 100 units @ $10.00 = $1,000 (COGS)
After: 0 units

RESULT:
- Quantity: 0
- Value: $0
- Average Cost: RETAINED at $10.00

WHY?
NetSuite keeps the last average cost for:
- Future receipts (as reference)
- Returns processing
- Reporting consistency

Next Receipt:
- New receipt of 50 @ $12.00
- Fresh calculation: 50 × $12 = $600
- New Average: $12.00 (last $10.00 is replaced)

Negative Inventory​

Negative Inventory Handling
═══════════════════════════════════════════════════════════════════════════════

If Allow Negative Inventory is enabled:

Before: 10 units @ $10.00 = $100
Sale: 15 units @ $10.00 = $150 (COGS)
After: -5 units @ $10.00 = -$50

Average Cost: Still $10.00 (unchanged)

When Receipt Arrives:
Before: -5 units @ $10.00 = -$50
Receipt: 20 @ $12.00 = $240

Net Qty: -5 + 20 = 15 units
Net Value: -$50 + $240 = $190

New Average: $190 / 15 = $12.67

⚠️ WARNING: Negative inventory can cause costing anomalies
Avoid if possible for accurate costing

Backdated Transactions​

Backdated Transaction Impact
═══════════════════════════════════════════════════════════════════════════════

Current Date: Jan 15
Current Average: $12.00

Backdated Receipt Entered: Jan 5, 100 @ $8.00

WHAT HAPPENS:
─────────────────────────────────────────────────────────────────────────────

1. Cost Engine identifies backdated transaction

2. Recalculates average as of Jan 5
(inserting the receipt in chronological order)

3. Rolls forward all subsequent transactions:
- Jan 6 sale: COGS recalculated with new average
- Jan 7 receipt: Average recalculated
- Jan 10 sale: COGS recalculated
- ... continues to present

4. GL adjustments generated for any differences

5. Current average may change from $12.00

⚠️ IMPACT: Backdated transactions can cause cascading recalculations
and GL adjustments across many transactions!

Formula Reference Card​

Quick Reference - Group Average Formulas
═══════════════════════════════════════════════════════════════════════════════

BASIC AVERAGE:
─────────────────────────────────────────────────────────────────────────────
GAC = Total Value / Total Quantity

AFTER RECEIPT:
─────────────────────────────────────────────────────────────────────────────
New GAC = (Old Value + Receipt Value) / (Old Qty + Receipt Qty)

Where:
Old Value = Old Qty × Old GAC
Receipt Value = Receipt Qty × Receipt Unit Cost

AFTER SALE:
─────────────────────────────────────────────────────────────────────────────
GAC = Unchanged (sales don't affect average)

COGS = Sale Qty × Current GAC
New Value = Old Value - COGS
New Qty = Old Qty - Sale Qty

AFTER ADJUSTMENT (Qty Only):
─────────────────────────────────────────────────────────────────────────────
GAC = Unchanged

Increase: New Value = Old Value + (Adj Qty × Current GAC)
Decrease: New Value = Old Value - (Adj Qty × Current GAC)

AFTER ADJUSTMENT (With Cost):
─────────────────────────────────────────────────────────────────────────────
New GAC = (Old Value + Adj Value) / (Old Qty + Adj Qty)

Where Adj Value = Adj Qty × Specified Cost

Next Steps​