Given the Selling price i.e ‘SP’ of the two items each. One item is sold at ‘P%’ Profit and other at ‘P%’ Loss. The task is to find out the overall Loss.
Input: SP = 2400, P = 30% Output: Loss = 474.725 Input: SP = 5000, P = 10% Output: Loss = 101.01
How does the above formula work?
For profit making item :
With selling price (100 + P), we get P profit.
With selling price SP, we get SP * (P/(100 + P)) profit
For loss making item :
With selling price (100 – P), we get P loss.
With selling price SP, we get SP * (P/(100 – P)) loss
Net Loss = Total Loss – Total Profit
= SP * (P/(100 – P)) – SP * (P/(100 + P))
= (SP * P * P * 2) / (100*100 – P*P)
Note: The above formula is applicable only when the Cost price of both the items are different. If CP of both the items are same then, in that case, there is ‘No profit No loss’.
Below is the implementation of the above approach
Loss = 474.725
- Find cost price from given selling price and profit or loss percentage
- Calculate the loss incurred in selling the given items at discounted price
- Program to find the profit or loss when CP of N items is equal to SP of M items
- Find Selling Price from given Profit Percentage and Cost
- Percentage increase in the cylinder if the height is increased by given percentage but radius remains constant
- Percentage increase in volume of the sphere if radius is increased by a given percentage
- Percentage increase in volume of the cube if a side of cube is increased by a given percentage
- Probability of distributing M items among X bags such that first bag contains N items
- ML | Common Loss Functions
- Program to calculate Profit Or Loss
- Overall percentage change from successive changes
- QA - Placement Quizzes | Profit and Loss | Question 13
- QA - Placement Quizzes | Profit and Loss | Question 14
- QA - Placement Quizzes | Profit and Loss | Question 11
- QA - Placement Quizzes | Profit and Loss | Question 12
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.