Calculating sales
To calculate a sales forecast we need to know both the price we wish to sell our product and the number of units we expect to sell. In this example we will have a look at a company T-Z producing and selling T-Shirts.
The company offers its customers two options - a basic shirt or a customized shirt. A T-shirt costs 15 USD for a basic shirt, and 25 USD for a customized one.
T-Z have forecast orders for T-Shirts for delivery next month, and want to use the same sales mix of 60% basic and 40% customized. As this mix is relatively stable, we can calculate an average sales price per unit for T-Z. The variable forecast_units
has been set for you.
This is a part of the course
“Financial Forecasting in Python”
Exercise instructions
- Set the variables for the basic sales price as
salesprice_basic
, the extensive customization price assalesprice_custom
. - Calculate the average sales price for the T-Shirts taking into account the sales mix.
- Calculate the forecast sales figure
sales_USD
for next month. - Print the total USD sales.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Set variables units sold and sales price of the T-shirts (basic and custom)
____ = ____
salesprice_custom = ____
# Calculate the combined sales price taking into account the sales mix
average_sales_price = (____ * 0.6) + (____ * ____)
# Calculate the total sales for next month
sales_USD = ____ * ____
# Print the total sales
print("Next month's forecast sales figure is {:.2f} USD.".format(____))
This exercise is part of the course
Financial Forecasting in Python
Step into the role of CFO and learn how to advise a board of directors on key metrics while building a financial forecast.
In this chapter, we will learn the basics of financial statements, with a specific focus on the income statement, which provides details on our sales, costs, and profits. We will learn how to calculate profitability metrics and finish off what we have learned by building our profit forecast for Tesla!
Exercise 1: Introduction to financial statementsExercise 2: Calculating gross profitExercise 3: Calculating net profitExercise 4: Elements within net profit & gross profitExercise 5: Calculating sales & Cost of Goods Sold (COGS)Exercise 6: Calculating salesExercise 7: Forecasting sales with a discountExercise 8: Calculating COGSExercise 9: Calculating the break-even pointExercise 10: Working with raw forecast datasetsExercise 11: Tesla income statementExercise 12: Forecasting profit for TeslaWhat is DataCamp?
Learn the data skills you need online at your own pace—from non-coding essentials to data science and machine learning.