Profit, Loss, and Discount
Computing profit and loss percentages from cost and selling price, and working out selling prices after single or successive discounts.
What you'll learn
- Compute profit percentage or loss percentage given cost price and selling price
- Compute the selling price given a marked price and one or more successive discounts
- Explain why successive discounts don't add up to their simple sum
Prerequisites
Explanation
Three prices matter in every buying-and-selling problem: cost price (CP), what the seller paid to acquire the item; selling price (SP), what the buyer actually pays; and marked price (MP), the "sticker" price before any discount is applied. A profit happens when SP > CP, a loss when SP < CP, and a discount is the gap between MP and SP.
Profit and loss percentages are always calculated on the cost price, never on the selling price — this is the single most important rule in this lesson, because it's the opposite of how discount percentage is calculated (that one uses marked price as the base). The formulas:
- Profit% = ((SP − CP) / CP) × 100, when SP > CP.
- Loss% = ((CP − SP) / CP) × 100, when CP > SP.
Worked example. A trader buys a fan for ₹1200 and sells it for ₹1500. Profit = 1500 − 1200 = ₹300. Profit% = (300 / 1200) × 100 = 25%. Notice the denominator is 1200 (the cost price), not 1500.
Discount percentage, by contrast, is calculated on the marked price: Discount% = ((MP − SP) / MP) × 100. If a shirt marked at ₹800 sells for ₹680 after a discount, the discount is (800 − 680)/800 × 100 = 15%.
Successive discounts behave exactly like successive percentage changes from the previous lesson: they multiply, they don't add. A shirt marked at ₹800 given a 20% discount and then a further 10% discount off the already-discounted price is not a flat 30% off. The actual selling price is 800 × 0.80 × 0.90 = ₹576, which is a combined discount of (800 − 576)/800 × 100 = 28%, one percentage point less than the naive 30% sum. This gap grows as either discount grows, so a shopper mentally adding "20% + 10% = 30% off" will always slightly overestimate their savings on successive discounts (equivalently, underestimate the final price).
The general pattern for n successive discounts d₁, d₂, …, dₙ applied to a marked price MP:
SP = MP × (1 − d₁/100) × (1 − d₂/100) × … × (1 − dₙ/100)
Whenever a problem gives you a marked price with more than one discount applied in sequence, apply each discount's multiplying factor one at a time to the running price, not the original marked price twice over — each discount is a percentage of whatever price it's currently being subtracted from.
Example
Successive discounts multiply as factors against the running price, not the original marked price.
function sellingPriceAfterDiscounts(markedPrice, discounts) {
const sp = discounts.reduce((price, d) => price * (1 - d / 100), markedPrice);
return Math.round(sp * 100) / 100;
}
// Example: sellingPriceAfterDiscounts(1000, [10, 5]) -> 855Guided exercise
Guided exercise
Write profitPercent(costPrice, sellingPrice) that returns the profit percentage as a positive number if sellingPrice > costPrice, or the loss percentage as a negative number if sellingPrice < costPrice, always calculated as a percentage of costPrice, rounded to 2 decimal places.
Checks: Correctly computes a profit percentage · Correctly computes a loss percentage as negative · plus 1 hidden check
Code editor. Press Escape then Tab to leave the editor if keyboard focus becomes trapped. Press Control+Shift+M inside the editor to toggle Tab-key focus trapping.
Stuck? Get a hint.
Independent exercise
Independent exercise
Write finalSellingPrice(markedPrice, discounts) where discounts is an array of successive percentage discounts (possibly empty) applied one after another to the running price. Return the final selling price rounded to 2 decimal places.
Checks: Applies two successive discounts correctly · Applies a single discount correctly · plus 1 hidden check
Code editor. Press Escape then Tab to leave the editor if keyboard focus becomes trapped. Press Control+Shift+M inside the editor to toggle Tab-key focus trapping.
Stuck? Get a hint.
Common mistakes
- Calculating profit or loss percentage using selling price as the denominator instead of cost price.
- Adding successive discount percentages together (assuming 20% then 10% off equals a flat 30% off) instead of multiplying the discount factors.
- Assuming the marked price and cost price are the same number when a problem only states one of them explicitly.
Knowledge check
Takeaway
Profit and loss percentages are always taken on cost price, discount percentages are always taken on marked price, and successive discounts multiply rather than add.
Summary
Cost price, selling price, and marked price play distinct roles: profit/loss percentages use cost price as the base, discount percentages use marked price as the base, and multiple successive discounts must be applied as multiplying factors to the running price rather than summed.
Your notes
Notes save automatically.
Finished this lesson?
Mark it complete to track your progress and schedule a future review.
AI tutor
The optional AI tutor isn't enabled in this deployment. All lessons, exercises, quizzes, and search work fully without it.