A company produces and sells a product for $20 per unit. the fixed costs(FC) are $5,000, and the variable cost(VC) per unit is 10.

  1. Total Revenue(TR) = Price×Quantity sold \[TR=P\times Q\]
  2. Total Cost(TC) = Fixed + (Variable Cost×Quantity sold) \[TC=FC+(VC\times Q)\]
  3. Break-even point(BEP) in units: \[BEP=\frac{FC}{P-VC}\] **Calculating the Break-Even Point
library(mosaic)
## Registered S3 method overwritten by 'mosaic':
##   method                           from   
##   fortify.SpatialPolygonsDataFrame ggplot2
## 
## The 'mosaic' package masks several functions from core packages in order to add 
## additional features.  The original behavior of these functions should not be affected by this.
## 
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
## 
##     count, do, tally
## The following object is masked from 'package:Matrix':
## 
##     mean
## The following object is masked from 'package:ggplot2':
## 
##     stat
## The following objects are masked from 'package:stats':
## 
##     binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
##     quantile, sd, t.test, var
## The following objects are masked from 'package:base':
## 
##     max, mean, min, prod, range, sample, sum
library(mosaicCalc)
## 
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
## 
##     D
library(ggplot2)
library(dplyr)
library(Matrix)
price_per_unit <- 20
fixed_costs <- 5000
variable_cost_per_unit <- 10
break_even_units<- fixed_costs/(price_per_unit-variable_cost_per_unit)
# Display result
break_even_units
## [1] 500

Break-Even Analysis Example

Scenario

A company produces and sells a product for $20 per unit. the fixed costs(FC) are $5,000, and the variable cost(VC) per unit is 10. ### Formulas: 1. Total Revenue(TR) = Price×Quantity sold \[TR=P\times Q\] 2. Total Cost(TC) = Fixed + (Variable Cost×Quantity sold) \[TC=FC+(VC\times Q)\] 3. Break-even point(BEP) in units: \[BEP=\frac{FC}{P-VC}\] Calculating the Break-Even Point

# Import libraries
library(mosaic)
library(mosaicCalc)
library(ggplot2)
library(dplyr)
library(Matrix)
# Define given values 
price_per_unit <- 20
fixed_costs <- 5000
variable_cost_per_unit <- 10
break_even_units<- fixed_costs/(price_per_unit-variable_cost_per_unit)
# Display result
break_even_units
## [1] 500

So, the company needs to sell **500 units to break even. ## Break-Even Table

# Create table for different quantity values
quantity <- seq(0,1000,100)
total_revenue <- price_per_unit*quantity
total_cost <- fixed_costs+(variable_cost_per_unit*quantity)
profit_loss <- total_revenue-total_cost

Create graphic

# Create a data frame
data <- data.frame(Quantity = quantity, 
                   Total_Revenue = total_revenue, 
                   Total_Cost = total_cost)

# Create ggplot object
p <- ggplot(data, aes(x = Quantity)) +
  geom_line(aes(y = Total_Cost, color = "Total Cost"), size = 1) +
  geom_line(aes(y = Total_Revenue, color = "Total Revenue"), size = 1) +
  geom_vline(xintercept = fixed_costs / (price_per_unit - variable_cost_per_unit), 
             linetype = "dashed", color = "red") +
  labs(title = "Break-Even Analysis",
       x = "Quantity",
       y = "Amount ($)") +
  scale_color_manual(values = c("Total Cost" = "red", "Total Revenue" = "cyan")) +
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
# Print the plot to ensure it appears in RPubs
print(p)