What Is Cost of Goods Sold (COGS) and How to Calculate It for E-commerce?
- Johan De Wet
- Apr 12
- 6 min read
Cost of Goods Sold (COGS) for e-commerce in South Africa refers to the total direct costs incurred by an online retailer to produce or purchase the products sold during a specific financial period. This figure includes the original purchase price of the stock, freight-in costs, and any direct packaging expenses, excluding indirect overheads like marketing or office rent. Calculating COGS accurately is vital for determining true gross profit and ensuring South African Revenue Service (SARS) tax compliance.
What is Cost of Goods Sold for E-commerce in South Africa?
Cost of Goods Sold (COGS) represents the direct investment required to acquire or manufacture the inventory your business sold over a set timeframe. In the South African e-commerce landscape, this calculation isolates the costs directly tied to the product from the general operating expenses of running your Shopify or WooCommerce store.
Understanding your cost of goods sold e-commerce South Africa figures allows you to see exactly how much profit remains after the physical product leaves your warehouse. For many local entrepreneurs, this is the difference between a business that looks busy and one that is actually sustainable. If you don't track these direct costs, you risk setting prices too low and eroding your margins before you even pay for your Facebook Ads or local courier fees.
COGS is not just an internal metric; it is a critical figure for your annual tax return (ITR14 or ITR12). SARS requires businesses to account for inventory correctly to ensure that taxable income is calculated accurately. By subtracting COGS from your total revenue, you arrive at your gross profit, which is the baseline for your business's financial health.
How Do You Calculate COGS for an E-commerce Business?
The standard formula for calculating COGS is: (Beginning Inventory + Purchases during the period) - Ending Inventory = Cost of Goods Sold. This formula focuses on the movement of stock and ensures that you only account for the costs of items actually sold, rather than all stock purchased in a tax year.
To apply this in a South African context, consider a local clothing brand. If you started the financial year on March 1st with R50,000 worth of stock, bought an additional R150,000 during the year, and ended on February 28th with R30,000 in stock, your COGS would be R170,000.
What Costs Should You Include in Your COGS Calculation?
You should include all direct costs required to get a product ready for sale, such as the supplier price, customs duties for imported goods, and inbound shipping. Direct labor costs are also included if you manufacture your own goods, such as a boutique furniture maker based in Cape Town or Johannesburg.
In South Africa, many e-commerce stores import products from China or Europe. You must include the currency conversion costs, shipping fees to the Port of Durban, and the specific customs duties levied by SARS. These are direct costs. However, the cost of the bubble wrap for individual customer orders is often debated; while some include it in COGS, others treat it as a variable selling expense. To be safe, any packaging that is an integral part of the product's shelf-readiness should be in COGS.
What Costs Are Excluded from COGS?
Costs excluded from COGS are indirect expenses or operating overheads, such as digital marketing spend, website hosting fees, warehouse rent, and administrative salaries. These are classified as operating expenses (OPEX) and are deducted from your gross profit to determine your net profit.
It is a common mistake for South African startups to lump their PayFast or Yoco transaction fees into COGS. These are selling expenses, not production costs. Similarly, the monthly subscription for your e-commerce platform or your bookkeeping software should not be included. Keeping these separate is essential for accurate financial analysis and for completing the correct sections of your SARS tax returns.
Why Is COGS Critical for South African E-commerce Success?
Monitoring COGS is critical because it directly influences your gross profit margin and your ultimate tax liability to SARS. High COGS relative to revenue indicates that your sourcing is too expensive or your pricing is too low, which can lead to cash flow crises even if your sales volume is high.
In the current 2026 economic climate, South African businesses face fluctuating Rand exchange rates and rising logistics costs. If you aren't tracking your cost of goods sold e-commerce South Africa metrics closely, a sudden dip in the Rand could turn a profitable product line into a loss-leader overnight. Knowing your COGS helps you decide when to hike prices or search for a more affordable local supplier.
How Does COGS Affect Your SARS Tax Liability?
COGS is a deductible business expense that reduces your taxable income, meaning a higher COGS results in a lower tax bill. However, this must be balanced against the fact that a higher COGS also means lower actual profit for the business owner.
When you submit your provisional tax returns in August and February, SARS looks at your estimated profit for the year. By having a real-time view of your COGS through automated accounting, you avoid overpaying your provisional tax. It also ensures that your year-end financial statements accurately reflect the value of the stock sitting in your warehouse or 3PL facility, which is a requirement under South African accounting standards.
How to Manage Inventory for Accurate COGS Reporting?
Accurate COGS reporting depends entirely on precise inventory management, specifically tracking your opening and closing stock levels for the financial year. Most South African e-commerce sellers use one of three valuation methods: First-In, First-Out (FIFO), Last-In, First-Out (LIFO), or Weighted Average Cost.
Using the FIFO Method in South Africa
The FIFO (First-In, First-Out) method assumes that the first items placed in inventory are the first ones sold. This is the most common method used by South African retailers as it typically reflects the actual flow of goods and aligns well with SARS preferences.
In an environment with rising inflation, FIFO results in a lower COGS because the older, cheaper items are recorded as sold first. This leads to a higher recorded profit and, consequently, a higher tax liability. However, it also provides a more accurate reflection of the current value of the remaining stock on your balance sheet.
Understanding the Weighted Average Cost Method
The Weighted Average Cost method calculates the average cost of all similar items in stock at the time of sale. This is often the simplest method for e-commerce owners who sell high volumes of identical products with frequent price fluctuations from suppliers.
To calculate this, you divide the total cost of goods available for sale by the total units available for sale. For a South African online store selling electronics, where prices change weekly due to exchange rate volatility, this method smooths out the peaks and valleys. It provides a more stable gross margin over the long term.
Common Pitfalls in Calculating COGS for E-commerce
One major pitfall is failing to account for "shrinkage"—the loss of inventory due to theft, damage, or administrative errors. If you don't perform regular stocktakes, your ending inventory figure will be too high, making your COGS too low and your taxable profit artificially inflated.
Another mistake specific to South Africa is handling VAT incorrectly. If your business is VAT-registered, you must use the exclusive-of-VAT price for your COGS calculations. Including the 15% VAT in your COGS would lead to a double-counting error, as you are already claiming that VAT back as input tax. If you are not VAT-registered, the VAT you pay to suppliers is a cost to you and should be included in your COGS.
How Technology Simplifies COGS for Small Businesses
Manually tracking every unit sold and its specific cost is nearly impossible for a growing e-commerce store. Implementing an automated accounting system that integrates with your online store can update your COGS in real-time as sales occur.
Modern platforms allow you to sync your inventory levels directly from Shopify, Wix, or Takealot. This ensures that every time a customer in Pretoria or Durban clicks "buy," your financial records reflect the reduction in inventory and the corresponding increase in COGS. This level of automation prevents the "year-end panic" when trying to reconstruct twelve months of invoices for your accountant.
Real-World Example: A South African Coffee Roaster
Imagine a coffee roaster in Cape Town selling beans online. Their COGS includes the raw green beans (imported), the gas used for roasting (direct production cost), and the branded bags. Shipping the beans from the port to the roastery is included in COGS.
However, the Facebook ads used to find customers and the cost of the cardboard shipping boxes sent via The Courier Guy are treated differently. While the shipping box is a direct expense, many roasters list this as a selling expense rather than COGS to keep their "product cost" distinct from their "fulfillment cost." This distinction helps the roaster see if their bean sourcing is efficient independent of their shipping strategy.
Future-Proofing Your E-commerce Finances
As we move through 2026, the South African e-commerce market continues to mature. Success no longer depends just on great products, but on tight financial controls and data-driven decision-making. Mastering your COGS is the first step toward that maturity.
By keeping a close eye on these figures, you can identify which products are your real heroes and which are "zombies"—products that look like they are selling but are actually costing you money after all direct expenses are paid. This clarity allows you to reinvest your capital into high-margin items that will truly grow your South African SME.
Managing your store's finances shouldn't be a hurdle to your growth. Smartbook provides South African small business owners with an intuitive, locally-tailored accounting platform that makes tracking expenses and calculating COGS effortless. By automating your bookkeeping, you can focus on scaling your brand while staying fully compliant with SARS. Try Smartbook today and take the guesswork out of your e-commerce profitability.
Comments