Skip to content
Tezmy Tools

COGS Calculator

Calculate cost of goods sold and gross profit

Cost of goods sold

27,000.00

Goods available for sale
35,000.00
Gross profit
23,000.00
Gross margin
46%

Cost of goods sold = beginning inventory + purchases − ending inventory. Gross profit = revenue − cost of goods sold.

Runs in your browser. Nothing is uploaded.

About the COGS Calculator

Cost of goods sold, or COGS, is what it cost you to buy or make the goods that you sold during a period. It is the main cost in a shop's profit calculation. This calculator takes the value of the stock at the start of the period, what you bought during it and the value of the stock left at the end, and gives the cost of goods sold. With revenue it also shows gross profit and gross margin. Type the beginning inventory, the purchases, the ending inventory and, optionally, the revenue and the cost of goods sold appears at once, with a few related figures underneath, and you can copy the result with one tap. The sums run in your browser, so nothing you enter is uploaded.

Updated October 2026

How to use the COGS Calculator

  1. 1Enter the beginning inventory, the purchases, the ending inventory and, optionally, the revenue.
  2. 2Pick the units or options from the menus if the cost of goods sold tool offers them.
  3. 3Read the cost of goods sold in the large result box.
  4. 4Look at the extra rows for related figures.
  5. 5Press Copy result to keep the answer.

When you need the cost of goods sold

Small business owners need COGS for tax returns and for a profit and loss account. Managers use the margin to judge pricing, and students use the formula in accounting courses.

COGS includes the direct costs of the goods, such as materials and freight in, but not selling costs like advertising or rent. Service businesses usually have no COGS.

    How the cost of goods sold is worked out

    COGS = beginning inventory + purchases − ending inventory. Gross profit = revenue − COGS. Gross margin = gross profit ÷ revenue. A shop that starts the year with 10,000 of stock, buys 25,000 more and ends with 8,000 has goods available of 35,000 and a COGS of 27,000. With revenue of 50,000, the gross profit is 23,000, a margin of 46 percent.

    Every answer on this page comes from that one rule, so you can check any result by hand with a calculator. The figures shown underneath, such as other units, are conversions of the same answer.

    • COGS and goods available
    • Gross profit and margin
    • Checks impossible stock levels

    Mistakes to avoid with cost of goods sold

    Inventory should be valued the same way at the start and the end of the period, such as first-in first-out or average cost. The ending stock cannot be more than what was available. If revenue is zero, the margin cannot be given.

      On phone and computer

      On a phone, type into the boxes one after another and read the cost of goods sold underneath; Copy result puts it on the clipboard for a message or a note. On a computer the inputs sit on the left and the answer on the right, so you can change one figure and watch the cost of goods sold move. The cogs calculator works the same on both. Costs lead to prices. Use Profit Margin Calculator and Markup Calculator to price your goods, Break-Even Calculator to see the sales you need, and EOQ Calculator to plan how much stock to order.

        Features

        • Value stock the same way each time
        • Selling costs are separate
        • Services have no COGS
        • Clear messages when the cost of goods sold inputs make no sense
        • Copy the result with one tap
        • Private: nothing is uploaded

        Frequently asked questions

        How do I calculate cost of goods sold?

        COGS = beginning inventory + purchases − ending inventory. Gross profit = revenue − COGS. Gross margin = gross profit ÷ revenue. A shop that starts the year with 10,000 of stock, buys 25,000 more and ends with 8,000 has goods available of 35,000 and a COGS of 27,000. With revenue of 50,000, the gross profit is 23,000, a margin of 46 percent.

        What is the formula for cost of goods sold?

        COGS = beginning inventory + purchases − ending inventory. Gross profit = revenue − COGS. Gross margin = gross profit ÷ revenue. The cogs calculator applies it exactly and rounds only the displayed answer to six significant figures.

        What does COGS include?

        Direct costs of buying or making the goods you sold: materials, direct labour and freight in.

        Is COGS the same as expenses?

        No. Operating costs like wages for sales staff, rent and advertising are separate from COGS.

        How do I get a higher gross margin?

        Raise prices, buy at lower cost or reduce waste and shrinkage.

        Is this cogs calculator free and private?

        Yes. It is free, needs no account and runs in your browser, so the numbers you type are not uploaded or stored.

        Related tools