CommencerCommencer gratuitement

Calculating gross profit

Gross profit is the amount of money you generated in sales minus the cost of selling those goods (Also know as Cost of Goods Sold or COGS). COGS does not include administration or marketing costs, only costs directly related to production or providing the good or service, so Gross Profit is a good metric to see the core profitability of any product\service.

\(Gross\,Profit = {Total\,SalesValue}-{Total\,COGS}\)

Gross profit margin is the gross profit expressed as a percentage of sales, which is valuable for analysis and decision making.

\(Gross\,Profit\,Margin = \frac{Gross\,Profit}{SalesValue}\)

As the manager of a factory, you have been asked to check the gross profit forecast for the following year.

Cet exercice fait partie du cours

Financial Forecasting in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Set the sales variable to 8000
sales = ____

# Set the cost of goods sold (cogs) variable to 5400
cogs = ____

# Calculate the gross profit (gross_profit)
____ = ____ - ____

# Print the gross profit
print("The gross profit is {}.".format(____))
Modifier et exécuter le code