← All guides

Profit and inventory

How to calculate and record Shopify COGS in QuickBooks

Calculate Shopify cost of goods sold by SKU, handle refunds and changing product costs, and record the inventory-to-COGS entry in QuickBooks Online.

A hand-drawn Shopify merchant combines material, freight and duty costs into product units before moving sold units from inventory to cost of goods sold.

The short answer

To calculate Shopify cost of goods sold, take the approved unit cost for every product variant sold, multiply it by the net quantity that left inventory, and add those costs for the period. Then record a separate entry in QuickBooks that increases Cost of Goods Sold and decreases Inventory Asset.

If a store sells two units costing $18 each and one unit costing $27, total COGS is $63. The journal debits COGS for $63 and credits Inventory Asset for $63. Revenue, tax, payment fees and the Shopify payout are recorded through their own accounting flow.

The arithmetic is easy. The difficult part is proving which unit cost applied on the sale date, whether a refunded item was actually restocked, and whether every SKU has a valid cost. A system that multiplies today's Shopify cost across last month's orders can produce a precise but wrong gross margin.

What belongs in Shopify COGS

Cost of goods sold includes costs directly attached to acquiring or producing the goods that were sold. For a reseller, that usually begins with the supplier price. For a manufacturer, it can include direct materials and labor under the approved costing policy.

Freight, customs duty, import tax that cannot be recovered, handling and other landed costs may form part of inventory cost when the accounting policy requires it. Marketing, office payroll, payment processing and monthly Shopify subscriptions are generally operating expenses rather than product cost.

The boundary depends on the business and jurisdiction. Decide the policy with the accountant, document it, and apply it consistently. Moving costs between COGS and operating expenses can change gross margin even when net profit stays the same.

Costs merchants commonly classify
CostUsually consideredQuestion to confirm
Supplier purchase priceProduct or inventory costDoes the amount include supplier discounts?
Inbound freight and dutyPotential landed costDoes the accounting policy capitalize it?
Direct production materialsProduct costCan the amount be measured per unit?
Shopify Payments feeOperating/payment expenseIs it already in the payout entry?
Shopify plan and appsOperating expenseIs the charge on the Shopify bill?
Advertising and creator feesOperating/marketing expenseIs it tied to selling rather than making the product?
Outbound customer shippingDepends on policyIs it reported as fulfillment expense or product cost?

The basic Shopify COGS formula

At the simplest level, COGS equals unit cost multiplied by quantity sold, summed across every SKU. Use the net quantity under the approved return treatment, not merely the number of orders.

Worked monthly COGS calculation
VariantUnits soldRestocked returnsNet unitsUnit costCOGS
Canvas tote1205115$9.50$1,092.50
Travel bottle80278$6.25$487.50
Desk lamp25025$31.00$775.00
Total2257218$2,355.00

The $2,355 total becomes the cost transferred from inventory to COGS for these units. The journal is a $2,355 debit to Cost of Goods Sold and a $2,355 credit to Inventory Asset. A product-level schedule supports the journal and explains the resulting gross margin.

Use the cost that applied when the item was sold

Product costs change. A supplier raises prices, freight changes, or a merchant renegotiates a discount. Shopify's Cost per item field is useful for profit reporting, but Shopify notes that the value is static and profit reports are only meaningful when a cost existed at the time of sale.

Do not overwrite a historical sale with a new cost merely because the current product record changed. Keep effective-dated cost evidence: SKU, unit cost, currency, effective date, source and approver. The sale should use the cost approved for its date.

If January units cost $8 and March units cost $10, a March update should not revalue January COGS to $10. That would reduce January profit after the period was reviewed and make comparisons unreliable.

  • SKU or variant identifier matches the order line.
  • Unit cost is effective on the sale date.
  • Currency matches the accounting records or has an approved conversion.
  • Landed-cost components follow the documented policy.
  • Source and approver are retained for later review.

Shopify cost per item versus QuickBooks inventory costing

Shopify can report profit using the cost per item stored on each product variant. QuickBooks inventory features can calculate inventory value and COGS through its inventory records and configured costing behavior. Those systems can disagree if they use different costs, dates, quantities or valuation methods.

Choose one authoritative inventory-cost process. If QuickBooks inventory items and sales forms are the operational system, let QuickBooks produce COGS and reconcile Shopify quantities to it. If a separate inventory system or approved effective-dated cost schedule owns product cost, post a controlled summary and prevent QuickBooks from creating the same COGS again.

Do not run two automatic COGS methods for the same Shopify sale. A payout app that posts COGS and a per-order connector that also reduces QuickBooks inventory can double product cost while revenue remains correct.

Handle refunds and restocked returns correctly

A financial refund and an inventory return are related but different. The customer can receive money back even when the item is damaged, lost, kept by the customer or discarded. COGS should reverse only when the approved evidence says the unit returned to sellable inventory or another defined inventory category.

Suppose a product originally cost $30. If it is refunded and restocked in sellable condition, the COGS reversal credits COGS and debits Inventory Asset for $30. If the customer keeps it, no inventory returns; the original $30 remains in COGS while the refund is recorded on the revenue side.

For damaged returns, the policy may move the cost to damaged inventory, shrinkage or another expense rather than ordinary sellable stock. Record what physically happened, not what would make the margin look better.

Refund evidence and COGS treatment
What happenedRevenue/refund sideInventory and COGS side
Refunded and restockedRecord the approved refundReverse COGS and restore inventory cost
Refunded, customer kept itemRecord the approved refundDo not restore inventory or reverse COGS
Returned but damagedRecord refund if issuedUse the approved damaged-stock or loss treatment
ExchangeRecord return and replacement activityFollow both units and avoid creating extra stock
Partial refund onlyRecord the partial revenue adjustmentNo automatic COGS reversal without inventory evidence

Record the COGS journal separately from the payout

The Shopify payout entry explains customer money: sales, refunds, tax, payment fees, adjustments, clearing and the bank deposit. The COGS entry explains product value moving from Inventory Asset to Cost of Goods Sold. Combining the two makes payout reconciliation harder and can cause inventory errors to block an otherwise correct bank match.

A separate COGS journal can use the source month or sale date required by the accounting policy. It should include a reference to the covered orders or payout evidence, the cost schedule and any exception report. The total debit must equal the total credit.

Illustrative COGS journal for the worked example
AccountDebitCredit
Cost of Goods Sold$2,355.00
Inventory Asset$2,355.00
Total$2,355.00$2,355.00

QuickBooks also documents a manual inventory method using this debit-and-credit pattern. Merchants using QuickBooks inventory features should follow the product and sales-form workflow for their plan rather than adding a second manual journal on top.

What to do when a SKU has no cost

Missing costs should be visible and blocking, not silently treated as zero. A zero cost increases gross profit and can make a fast-selling product look unusually successful. It also prevents the inventory credit from reflecting the product that left stock.

Group missing costs by SKU and quantity so the merchant can fix the largest exposure first. Obtain a supplier invoice, landed-cost schedule or other approved source. Add an effective date and reviewer, then recalculate the affected open period.

Do not guess a cost from selling price or copy a nearby SKU merely to finish the close. If evidence cannot be obtained before a deadline, document the limitation and use only an accountant-approved estimate with a clear follow-up action.

Watch bundles, kits and changing components

A bundle sold as one Shopify variant may contain several inventory items. Its COGS should reflect the approved cost of the components shipped, including quantity. If the bundle contents change, keep an effective-dated bill of materials rather than editing the old recipe.

For a three-pack, confirm whether Shopify inventory tracks the pack as one unit or decrements three component units. A mismatch between the commercial SKU and inventory units can multiply or understate COGS even when each component cost is correct.

Samples, gifts, replacements and influencer units also remove stock without ordinary product revenue. Track them through the approved promotion, replacement or inventory-adjustment policy instead of hiding them inside sold-unit COGS.

Reconcile COGS and inventory at month end

  1. Confirm every active sold variant has an approved effective-dated unit cost.
  2. Compare Shopify sold and returned quantities with the inventory source for the month.
  3. Resolve missing SKUs, bundles, exchanges and ambiguous restock evidence.
  4. Calculate gross COGS, valid restock reversals and other approved inventory movements.
  5. Post or verify the separate balanced COGS journal in QuickBooks.
  6. Reconcile the ending Inventory Asset balance to the approved inventory valuation.
  7. Compare gross margin by product or category with prior months and investigate unusual movement.
  8. Save the cost schedule, exception decisions, journal reference and reviewer sign-off.

An ending inventory difference is not solved by changing COGS until profit looks reasonable. Trace purchases, receipts, sales, returns, damage and stock-count adjustments. The correction should explain physical stock as well as the financial statements.

Gross profit and gross margin: the merchant view

Gross profit equals net sales minus cost of goods sold. Gross margin expresses that gross profit as a percentage of net sales. If net sales are $10,000 and COGS is $6,000, gross profit is $4,000 and gross margin is 40%.

A discount can reduce margin even when unit cost stays the same. Shopify's example of an item sold for $15 with a $10 cost produces a lower margin than the same item sold at $20. Refunds, missing costs and incorrect restocks also change the result.

Use margin to identify products, promotions or channels that deserve investigation, but do not treat it as net profit. Advertising, fulfillment, Shopify subscriptions, payroll and other operating expenses still need to be paid after gross profit.

How Vatteo controls Shopify COGS

Vatteo is built for Shopify Payments merchants using QuickBooks Online who want product cost inside the same controlled month-end workflow as payout reconciliation. It stores effective-dated cost evidence so a later price change does not rewrite an earlier sale.

Missing and ambiguous cost coverage appears as an exception. Restocked returns reverse cost only when the source evidence supports the return treatment. The COGS journal remains separate from the payout bank journal, and the close stays visibly incomplete until required cost decisions are resolved or documented.

That makes Vatteo the stronger choice for a merchant whose payout automation works but whose gross margin still depends on an uncontrolled spreadsheet. Explore the sample month first, then test real product costs in an open accounting period before relying on the reports.

A COGS review checklist

  • Unit costs include only components allowed by the approved accounting policy.
  • Every cost has a SKU, currency, source, effective date and approver.
  • Sold quantities agree with the order or inventory evidence.
  • Refunds reverse COGS only when inventory was genuinely restored under the policy.
  • Bundles and multipacks use the correct component quantities.
  • The COGS debit equals the Inventory Asset credit.
  • No order connector or inventory app posts the same COGS again.
  • Ending inventory agrees with the approved valuation or has documented differences.
  • Gross-margin changes are explained before the month is closed.

Common questions

Shopify COGS in QuickBooks FAQ

How do I calculate COGS for Shopify?

Multiply the approved unit cost effective on each sale date by the net quantity that left inventory, then add the results across all sold variants. Apply the approved policy for landed costs, bundles and returns.

What is the QuickBooks entry for Shopify COGS?

A common summary entry debits Cost of Goods Sold and credits Inventory Asset for the same amount. Merchants using QuickBooks inventory features should avoid adding a duplicate manual journal.

Are Shopify processing fees part of COGS?

They are usually recorded as payment-processing expenses rather than product cost. Confirm the classification with the accountant and keep them separate from the inventory-to-COGS entry.

Should a Shopify refund reverse COGS?

Only when the product returns to inventory under the approved policy. A refund where the customer keeps the item does not recreate inventory and should not automatically reverse COGS.

Can I use Shopify's current cost per item for old sales?

Not safely when the cost changed. Use the cost that was effective when the product sold. Keep dated cost evidence so current updates do not rewrite historical gross margin.

Does Vatteo calculate Shopify COGS?

Vatteo supports effective-dated product costs, cost-coverage exceptions, evidence-based return treatment and a separate balanced COGS journal inside the Shopify month-end close workflow.

Sources

Platform behaviour changes. These first-party references were checked on 1 August 2026.

  1. Shopify: Profit reports
  2. Shopify: Profit reporting considerations and static product costs
  3. QuickBooks: Inventory assets and cost of goods sold tracking
  4. QuickBooks: Set up initial cost for inventory items
  5. QuickBooks: Add inventory products in QuickBooks Online
  6. QuickBooks: Inventory effects on financial reports
  7. QuickBooks: Track inventory manually