# Conversions kg_in_g = 1000 water_l_in_g = 1000 olive_oil_l_in_g = 928 kw_to_w = 1000 hour_in_mins = 60 # Cost of manual labor sample_hourly_labor_wage = 4 # Currently bought bread from the store (white, not whole-grain) bread_price_store = 1 bread_weight_store_g = 600 bread_purchase_time_mins = 12 bread_price_store_purchase = bread_price_store + (bread_purchase_time_mins / hour_in_mins) * sample_hourly_labor_wage # Bread recipe needs recipe_water_g = 330 recipe_olive_oil_g = 30 recipe_salt_g = 14 recipe_whole_grain_flour_g = 220 recipe_flour_g = 280 recipe_brown_sugar_g = 18 recipe_powdered_milk_g = 14 recipe_yeast_g = 4.5 recipe_make_weight_g = 900 # Breadmaking machine needs recipe_machine_time_h = 3.5 machine_power_usage_w = 550 electricity_kwh_price = 0.15 # Ingredient prices price_water_11l = 3.6 price_olive_oil_extra_virgin_l = 10.5 price_salt_kg = 0.65 price_whole_grain_flour_kg = 2.4 price_flour_kg = 1.4 price_brown_sugar_500g = 2.25 price_powdered_milk_500g = 3.5 price_yeast_7g = 0.35 # Manual machine operations work recipe_preparation_time_mins = 10 machine_cleaning_time_mins = 5 total_mins_with_machine = recipe_preparation_time_mins + machine_cleaning_time_mins price_machine_usage = (total_mins_with_machine / hour_in_mins) * sample_hourly_labor_wage # Per-ingredient price estimation price_water_330g = (price_water_11l / 11) * (recipe_water_g / water_l_in_g) price_olive_oil_30g = (price_olive_oil_extra_virgin_l / olive_oil_l_in_g) * recipe_olive_oil_g price_salt_14g = (price_salt_kg / kg_in_g) * recipe_salt_g price_whole_grain_flour_220g = (price_whole_grain_flour_kg / kg_in_g) * recipe_whole_grain_flour_g price_flour_280g = (price_flour_kg / kg_in_g) * recipe_flour_g price_brown_sugar_18g = (price_brown_sugar_500g / 500) * recipe_brown_sugar_g price_powdered_milk_14g = (price_powdered_milk_500g / 500) * recipe_powdered_milk_g price_yeast_4_5g = (price_yeast_7g / 7) * recipe_yeast_g price_electricity = ((recipe_machine_time_h * machine_power_usage_w) / kw_to_w) * electricity_kwh_price # Sum of ingredient prices prices, labels = [ price_water_330g, price_olive_oil_30g, price_salt_14g, price_whole_grain_flour_220g, price_flour_280g, price_brown_sugar_18g, price_powdered_milk_14g, price_yeast_4_5g, price_electricity, price_machine_usage ], ['water', 'olive oil', 'salt', 'whole-grain flour', 'flour', 'brown sugar', 'powdered milk', 'yeast', 'electricity', 'manual machine operation'] price_total = sum(prices) # Comparison of prices for 100g of the two bread types price_100g_white_bread = (bread_price_store_purchase / bread_weight_store_g) * 100 price_100g_whole_grain_bread = (price_total / recipe_make_weight_g) * 100 perc_more_expensive = ((price_100g_whole_grain_bread - price_100g_white_bread) / price_100g_white_bread) * 100 print('Price of 100g white bread (store): %.4f' % price_100g_white_bread) print('Price of 100g whole-grain bread (machine-made): %.4f' % price_100g_whole_grain_bread) print('The whole-grain bread is %.2f%% more expensive.' % perc_more_expensive) # Price of 100g white bread (store): 0.3000 # Price of 100g whole-grain bread (machine-made): 0.3410 # The whole-grain bread is 13.68% more expensive.
At the end, a price increase of 13.7% may not appear that much, if we consider the health benefits of whole-grain bread compared to white bread. Depending on lifestyle goals, the switch might seem reasonable.
We could also plot the cost of the various components participating in breadmaking:
We might have thought that the cost of the flours is dominating the total cost of the machine-made bread, but this is not necessarily the case. For instance, if someone is earning the equivalent of at least 4 breads/hour, spending 15 mins in finding all ingredients, weighting them with accuracy down to the gram, mixing them, choosing the right program and subsequently cleaning the machine would cost as much as one additional bread—a fact, which often remains unseen. And if someone is earning significantly more, then operating such machine will actually cost them a lot, where the fixed cost of the flours could become progressively negligible.
Our impression that self-made bread is cheaper when we forget to consider our time, electricity cost or other factors can be self-assuring. One reason is that it is easy to look at individual components and be impressed how much cheaper each of them is compared to a regular bread. But we often have trouble to think and consider all factors together, when they are in multiple quantities and units, which is what this code has attempted to address.