Calculating COGS
Cost of Goods Sold (COGS) is calculated as follows:
\(COGS = Opening\,value\,of\,stock\) - \(closing\,value\,of\,stock\) + \(fixed\,costs\,current\,period\) + \(variable\,costs\,current\,period\)
We assume no closing or opening balances, stock is sold in the same month that it is produced.
Material costs to produce one T-shirt is 8 USD. Labor costs are 2 USD per shirt. As you only use materials and labor to make the shirt, this is known as variable costs. The costs to rent a machine that produces these shirts is 1300 USD per month, regardless of the amount of shirts produced. This is therefore an example of a fixed cost, as fixed costs in COGS are costs directly related to the product but are incurred whether you produce the products or not.
Preloaded variables are printed in the shell.
Cet exercice fait partie du cours
Financial Forecasting in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Set the variables for fixed costs and variable costs
fixed_costs = ____
variable_costs_per_unit = ____ + labor_costs_per_unit
# Calculate the cogs for January and February
cogs_jan = (____ * variable_costs_per_unit) + ____
cogs_feb = ____