Open In App

Program to find the Break Even Point

Last Updated : 11 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Given the list of monthly expenditure 

\sum exp
 

of an organization, selling price 


S
 

and the overhead maintenance 


M
 

of each item, the task is to calculate the Break Even Point. 
Break Even Point refers to the number of items sold in order to neutralize the total expenditure i.e. Overall, neither profit nor loss.
Examples:
 


 

Input: Expenditure = 18000, S = 600, M = 100 
Output: 36 
We need to sell 36 items to cover expenditure and maintenance overhead
Input: Expenditure = 3550, S = 90, M = 65 
Output: 142


 


 


 

Approach:

  1. Calculate the sum of all the expenditures.
  2. Subtract the maintenance (Cost price) from the selling price.
  3. Divide the expenditure sum by the above-obtained amount to get the minimum number of items to be sold (Break Even Point).

Below is the implementation of the above approach:  

C++

// C++ program to find the break-even point.
 
#include <iostream>
#include <math.h>
using namespace std;
 
// Function to calculate Break Even Point
int breakEvenPoint(int exp, int S, int M)
{
    float earn = S - M;
 
    // Calculating number of articles to be sold
    int res = ceil(exp / earn);
 
    return res;
}
 
// Main Function
int main()
{
    int exp = 3550, S = 90, M = 65;
    cout << breakEvenPoint(exp, S, M);
    return 0;
}

                    

Java

// Java program to find Break Even Point
import java.io.*;
import java.lang.*;
 
class GFG
{
// Function to calculate
// Break Even Point
public static int breakEvenPoint(int exp1,
                                 int S, int M)
{
    double earn = S - M;
     
    double exp = exp1;
 
    // Calculating number of
    // articles to be sold
    double res = Math.ceil(exp / earn);
 
    int res1 = (int) res;
     
    return res1;
}
 
// Driver Code
public static void main (String[] args)
{
    int exp = 3550, S = 90, M = 65;
    System.out.println(breakEvenPoint(exp, S, M));
}
}
 
// This code is contributed
// by Naman_Garg

                    

Python 3

# Python 3 program to find
# Break Even Point
import math
 
# Function to calculate
# Break Even Point
def breakEvenPoint(exp, S, M):
     
    earn = S - M
 
    # Calculating number of
    # articles to be sold
    if res != 0:
      res = math.ceil(exp / earn)
    # if profit is 0, it will never make ends meet
    else:
      res = float('inf')
         
    return res
     
# Driver Code
if __name__ == "__main__" :
         
    exp = 3550
    S = 90
    M = 65
     
    print (int(breakEvenPoint(exp, S, M)))
 
# This code is contributed
# by Naman_Garg

                    

C#

// C# program to find Break Even Point
using System;
 
class GFG
{
// Function to calculate
// Break Even Point
public static int breakEvenPoint(int exp1,
                                int S, int M)
{
    double earn = S - M;
     
    double exp = exp1;
 
    // Calculating number of
    // articles to be sold
    double res = Math.Ceiling(exp / earn);
 
    int res1 = (int) res;
     
    return res1;
}
 
// Driver Code
public static void Main ()
{
    int exp = 3550, S = 90, M = 65;
    Console.WriteLine(breakEvenPoint(exp, S, M));
}
}
 
// This code is contributed
// by inder_verma..

                    

PHP

<?php
// PHP program to find the break-even point.
 
// Function to calculate Break Even Point
function breakEvenPoint($exp, $S, $M)
{
    $earn = $S - $M;
 
    // Calculating number of articles
    // to be sold
    $res = ceil($exp / $earn);
 
    return $res;
}
 
// Driver Code
$exp = 3550; $S = 90; $M = 65;
echo breakEvenPoint($exp, $S, $M);
 
// This code is contributed
// by inder_verma..
?>

                    

Javascript

<script>
 
// Javascript program to find the break-even point.
 
// Function to calculate Break Even Point
function breakEvenPoint(exp, S, M)
{
    var earn = S - M;
 
    // Calculating number of articles to be sold
    var res = Math.ceil(exp / earn);
 
    return res;
}
 
// Main Function
var exp = 3550, S = 90, M = 65;
document.write( breakEvenPoint(exp, S, M));
 
</script>

                    

Output: 
142

 

Time Complexity: O(1)

Auxiliary Space: O(1)



Similar Reads

Find time required to reach point N from point 0 according to given rules
Given two positive integers X and Y and N number of points arranged in a line, the task is to find the time required to reach point N from point 0 according to the following rules: Every point has one barrier that closes after every Y minutes and remains closed for the next Y minutes.On reaching a point if the barrier is closed, then the person nee
7 min read
Reflection of a point at 180 degree rotation of another point
Given two points coordinates (x1, y1) and (x2, y2)on 2D plane. The task is to find the reflection of (x1, y1) at 180 degree rotation of (x2, y2).Examples: Input : x1 = 0, y1 = 0, x2 = 1, y2 = 1 Output : (2, 2) Input : x1 = 1, y1 = 1, x2 = 2, y2 = 2 Output : (3, 3) Let the reflection point of point (x1, y1) about (x2, y2) be (x', y'). For (x', y') b
4 min read
Rotation of a point about another point
We have already discussed the rotation of a point P about the origin in the Set 1 and Set 2. The rotation of point P about origin with an angle ? in the anti-clockwise direction is given as under: Rotation of P about origin: P * polar(1.0, ?)Rotation of P about point Q Now, we have to rotate the point P not about origin but about a general point Q.
8 min read
Find the nearest odd and even perfect squares of odd and even array elements respectively
Given an array arr[ ] of size N, the task for each array element is to print the nearest perfect square having same parity. Examples: Input: arr[ ] = {6, 3, 2, 15}Output: 4 1 4 9Explanation:The nearest even perfect square of arr[0] (= 6) is 4.The nearest odd perfect square of arr[1] (= 3) is 1.The nearest even perfect square of arr[2] (= 2) is 4The
5 min read
Check whether given floating point number is even or odd
Given a floating-point number, check whether it is even or odd. We can check whether a integer is even or odd by dividing its last digit by 2. But in case of floating point number we can't check a given number is even or odd by just dividing its last digit by 2. For example, 100.70 is an odd number but its last digit is divisible by 2. Examples : I
6 min read
Program to find the mid-point of a line
Given two coordinates of a line starting is (x1,y1) and ending is (x2,y2) find out the mid-point of a line. Examples : Input : x1 = –1, y1 = 2, x2 = 3, y2 = –6 Output : 1,–2 Input : x1 = 6.4, y1 = 3 x2 = –10.7, y2 = 4 Output : –2.15, 3.5 The Midpoint Formula: The midpoint of two points, (x1, y2) and (x2, y2) is the point M found by the following fo
3 min read
Program to find GCD of floating point numbers
The greatest common divisor (GCD) of two or more numbers, which are not all zero, is the largest positive number that divides each of the numbers. Example: Input : 0.3, 0.9 Output : 0.3 Input : 0.48, 0.108 Output : 0.012 The simplest approach to solve this problem is :a=1.20 b=22.5 Expressing each of the numbers without decimals as the product of p
4 min read
Loops and Control Statements (continue, break and pass) in Python
Python programming language provides the following types of loops to handle looping requirements. Python While Loop Until a specified criterion is true, a block of statements will be continuously executed in a Python while loop. And the line in the program that follows the loop is run when the condition changes to false. Syntax of Python Whilewhile
4 min read
Word Break Problem | DP-32 | Set - 2
Given a non-empty sequence S and a dictionary dict[] containing a list of non-empty words, print all possible ways to break the sentence in individual dictionary words.Examples: Input: S = "catsanddog" dict[] = {"cat", "cats", "and", "sand", "dog"} Output: "cats and dog" "cat sand dog"Input: S = "pineapplepenapple" dict[] = {"apple", "pen", "applep
15 min read
Check if permutation of one string can break permutation of another
Given two strings str1 and str2, the task is to check if any permutation of the given strings str1 and str2 is possible such that the character at each index of one string is greater than or equal to the other string. Examples: Input: A = "abc", B = "xya" Output: Yes Explanation: "ayx" is a permutation of B = "xya" which can break to string "abc" w
6 min read
Practice Tags :