Cost of Goods Sold Calculator
This cost of goods sold (COGS) calculator helps you translate inventory and purchasing data into the expense that appears on your income statement as cost of goods sold.
By entering beginning inventory, purchases, additional direct costs, purchase returns, and ending inventory, you obtain a clean COGS figure that is consistent with widely used accounting guidance for manufacturers, wholesalers, and retailers.
The tool is designed for accountants, controllers, founders, and analysts who need a quick but defensible COGS estimate for financial reporting, budgeting, and tax planning discussions with a qualified professional.
Governance
Record b6af0f0fb61f • Reviewed by Fidamen Standards Committee
Inputs
Results
Cost of goods sold (COGS)
$0.00
| Output | Value | Unit |
|---|---|---|
| Cost of goods sold (COGS) | $0.00 | — |
Visualization
Methodology
This calculator uses the standard cost of goods sold formula found in government and university accounting references: cost of goods sold equals beginning inventory plus purchases and other direct costs, minus purchase returns and allowances, minus ending inventory.
Beginning inventory represents the cost of goods you had on hand at the start of the period, measured using your chosen inventory method (such as FIFO, LIFO, or weighted average) and valuation basis.
Purchases and production costs include the cost of merchandise or raw materials acquired or manufactured during the period, including amounts capitalized into inventory under your accounting policy.
Additional direct costs are costs necessary to bring inventory to its present location and condition, such as inbound freight, direct labor, and factory overhead that are capitalized into inventory and then flow through to cost of goods sold when goods are sold.
Purchase returns, allowances, and discounts reduce the cost of inventory acquired; entering them separately makes the calculation transparent and keeps your purchases input focused on gross spend before reductions.
Ending inventory represents the cost of goods still on hand at the end of the period; subtracting this amount removes unsold items from the cost of goods sold so that COGS reflects only goods actually sold during the period.
Formally, the calculator computes cost of goods sold as: COGS = Beginning inventory + Purchases + Additional direct costs − Purchase returns and allowances − Ending inventory.
This structure mirrors the approach in tax and financial reporting frameworks, but it does not choose or enforce a specific inventory costing method; you should ensure that the inventory figures you enter are prepared consistently with your accounting policies and any applicable tax rules.
F.A.Q.
What is the standard formula for cost of goods sold (COGS)?
The standard cost of goods sold formula is beginning inventory plus purchases and other direct costs, minus purchase returns and allowances, minus ending inventory. In symbols: COGS = Beginning inventory + Purchases + Additional direct costs − Purchase returns and allowances − Ending inventory.
Which costs should I include in purchases and additional direct costs?
Purchases should generally include the cost of merchandise or raw materials acquired during the period. Additional direct costs typically include expenses that are capitalized into inventory, such as inbound freight, direct manufacturing labor, and factory overhead attributable to the goods sold. Selling, general, and administrative expenses such as marketing, office rent, or corporate salaries are usually not included in cost of goods sold.
Does this calculator work for both manufacturers and retailers?
Yes. For retailers and wholesalers, purchases usually represent merchandise bought for resale. For manufacturers, purchases and additional direct costs can represent raw materials, direct labor, and production overhead that are capitalized into inventory. As long as beginning and ending inventory are measured consistently, the formula applies to both types of businesses.
How does cost of goods sold relate to gross profit and gross margin?
Gross profit is calculated as revenue minus cost of goods sold. Gross margin is typically expressed as gross profit divided by revenue, often shown as a percentage. A higher cost of goods sold reduces gross profit and gross margin, while a lower cost of goods sold, holding revenue constant, improves these metrics.
Can service businesses use this cost of goods sold calculator?
Pure service businesses often do not report cost of goods sold in the same way as product-based businesses because they do not manage significant inventories of tangible goods. However, hybrid businesses that deliver both products and services can use this calculator for the portion of their operations that involves buying or producing goods held in inventory.
Is this calculator suitable for preparing tax returns or audited financial statements?
This calculator is designed as an educational and planning tool that follows common formulas used in accounting and tax guidance, but it does not replace detailed recordkeeping or professional advice. For tax filings or audited financial statements, you should rely on your underlying inventory records, your accounting system, and guidance from a qualified accountant or tax advisor.
Sources & citations
- IRS Instructions for Schedule C, Part III Cost of Goods Sold — https://www.irs.gov/instructions/i1040sc
- IRS Statistics of Income, Explanation of Terms for Form 1125-A Cost of Goods Sold — https://www.irs.gov/pub/irs-soi/13cosec5ccr.pdf
- U.S . Census Bureau, Manufacturing and Trade Inventories and Sales: Cost of Goods Sold Definitions — https://www.census.gov/mtis/definitions.html
- OpenStax , Principles of Financial Accounting, Section 10.2 Calculate the Cost of Goods Sold and Ending Inventory Using the Periodic Method — https://openstax.org/books/principles-financial-accounting/pages/10-2-calculate-the-cost-of-goods-sold-and-ending-inventory-using-the-periodic-method
- Lumen Learning, Managerial Accounting: Cost of Goods Sold — https://courses.lumenlearning.com/wm-managerialaccounting/chapter/cost-of-goods-sold/
- AccountingCoach , Inventory and Cost of Goods Sold Explanation — https://www.accountingcoach.com/inventory-and-cost-of-goods-sold/explanation
- FASB — Financial Accounting Standards Board (GAAP) — https://www.fasb.org/
- SEC — Financial Reporting Manual — https://www.sec.gov/corpfin/cf-manual
- AICPA — American Institute of CPAs — https://www.aicpa-cima.com/
Further resources
Versioning & Change Control
Audit record (versions, QA runs, reviewer sign-off, and evidence).
Record ID: b6af0f0fb61fWhat changed (latest)
v1.0.0 • 2025-11-11 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Public QA status
PASS — golden 25 + edge 120
Last run: 2026-01-23 • Run: golden-edge-2026-01-23
Versioning & Change Control
Audit record (versions, QA runs, reviewer sign-off, and evidence).
What changed (latest)
v1.0.0 • 2025-11-11 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Public QA status
PASS — golden 25 + edge 120
Last run: 2026-01-23 • Run: golden-edge-2026-01-23
Engine
v1.0.0
Data
Baseline (no external datasets)
Content
v1.0.0
UI
v1.0.0
Governance
Last updated: Nov 11, 2025
Reviewed by: Fidamen Standards Committee (Review board)
Credentials: Internal QA
Risk level: low
Reviewer profile (entity)
Fidamen Standards Committee
Review board
Internal QA
Entity ID: https://fidamen.com/reviewers/fidamen-standards-committee#person
Semantic versioning
- MAJOR: Calculation outputs can change for the same inputs (formula, rounding policy, assumptions).
- MINOR: New features or fields that do not change existing outputs for the same inputs.
- PATCH: Bug fixes, copy edits, or accessibility changes that do not change intended outputs except for previously incorrect cases.
Review protocol
- Verify formulas and unit definitions against primary standards or datasets.
- Run golden-case regression suite and edge-case suite.
- Record reviewer sign-off with credentials and scope.
- Document assumptions, limitations, and jurisdiction applicability.
Assumptions & limitations
- Uses exact unit definitions from the Fidamen conversion library.
- Internal calculations use double precision; display rounding follows the unit's configured decimal places.
- Not a substitute for calibrated instruments in regulated contexts.
- Jurisdiction-specific rules may require official guidance.
Change log
v1.0.0 • 2025-11-11 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Areas: engine, content, ui • Reviewer: Fidamen Standards Committee • Entry ID: fcbf8e000de7
- https://courses.lumenlearning.com/wm-managerialaccounting/chapter/cost-of-goods-sold/
- https://openstax.org/books/principles-financial-accounting/pages/10-2-calculate-the-cost-of-goods-sold-and-ending-inventory-using-the-periodic-method
- https://www.accountingcoach.com/inventory-and-cost-of-goods-sold/explanation
- https://www.aicpa-cima.com/
- https://www.census.gov/mtis/definitions.html
- https://www.fasb.org/
- https://www.irs.gov/instructions/i1040sc
- https://www.irs.gov/pub/irs-soi/13cosec5ccr.pdf
- https://www.sec.gov/corpfin/cf-manual
