Profit and Loss Problems — Profit% on SP Cost ₹2 Lakh
Profit% on SP instead of CP cost a retail chain ₹2 lakh.
20+ years shipping production code across the stack, with years spent interviewing engineers. Written from production experience, not tutorials.
- ✓Basic programming fundamentals
- ✓A computer with internet access
- ✓Willingness to follow along with examples
- Profit and loss problems test your ability to compute gains and losses from buying and selling.
- The four foundation terms: Cost Price (CP), Selling Price (SP), Profit, Loss.
- Profit% and Loss% are always calculated on CP — not SP. This is the #1 mistake.
- Use formulas: SP = CP × (1 ± P%/100) and reverse formulas for CP.
- For combined markup and discount, net % = M − D − (M×D)/100.
- Always verify by working backwards to catch arithmetic errors.
Imagine you buy a cricket bat for ₹500 and sell it to your friend for ₹600. You made ₹100 extra — that's your profit. Now flip it: you bought it for ₹500 but had to sell it for ₹400 because no one wanted it — that ₹100 you lost is called a loss. Profit and loss is literally just the story of buying something and selling it, and figuring out whether you came out ahead or behind.
Every business on the planet — from a street-side chai stall to Amazon — lives and breathes profit and loss. When a shopkeeper marks up a price, offers a discount, or sells goods in bulk, they're doing profit and loss calculations in their head. These aren't abstract math problems; they're the engine of commerce. That's exactly why aptitude tests and technical interviews use them: they reveal whether you can think clearly about numbers under pressure.
Profit and Loss Problems — The Real Math Behind Margin and Markup
Profit and loss aptitude problems test your ability to compute gain or loss as a percentage of cost price (CP) or selling price (SP). The core mechanic: Profit = SP - CP; Loss = CP - SP; Profit% = (Profit/CP) × 100; Loss% = (Loss/CP) × 100. A common twist is when profit is given as a percentage of SP — e.g., "profit% on SP" — which changes the denominator. For a ₹2 lakh cost item sold at 20% profit on SP, SP = CP / (1 - profit% on SP) = 200000 / 0.8 = ₹2.5 lakh; profit = ₹50,000.
The key property: profit% on CP always yields a higher profit amount than the same % on SP for the same CP. This is because CP is smaller than SP when there's profit. In practice, many e-commerce and retail systems use margin (profit% on SP) for pricing, while accounting uses markup (profit% on CP). Confusing the two leads to incorrect pricing, margin erosion, or overpricing. Always verify which base the percentage refers to.
Use these calculations when building pricing engines, discount logic, or financial reports. In real systems, a 10% margin error on a ₹2 lakh item means ₹20,000 lost per transaction. At scale, that's millions. Understanding the distinction prevents silent revenue leaks and ensures your pricing model matches business intent.
The Four Foundation Terms You Must Know Cold
Before you touch a single formula, you need to own these four terms. Confusing any two of them is the #1 reason candidates lose marks.
Cost Price (CP): The price at which you BUY something. This is your investment. If you bought a phone for ₹10,000, your CP is ₹10,000.
Selling Price (SP): The price at which you SELL something. If you sold that phone for ₹12,000, your SP is ₹12,000.
Profit: When SP > CP. You sold for MORE than you paid. Profit = SP − CP.
Loss: When CP > SP. You sold for LESS than you paid. Loss = CP − SP.
Here's the anchor image to burn into memory: think of CP as the floor. If your SP is above the floor, you're in profit territory. If it's below the floor, you're in a hole — a loss. Everything in profit and loss revolves around the relationship between these two numbers. Get this instinct right and every formula that follows will feel obvious, not memorised.
The Master Formula Sheet — Every Variation in One Place
Once you know CP and SP, everything else is derived. Here's every formula you'll ever need, explained with the reasoning behind each one.
Finding SP when CP and Profit% are given: SP = CP × (1 + Profit%/100) Think of it as: SP = CP + (Profit% of CP). You're adding the gain on top.
Finding SP when CP and Loss% are given: SP = CP × (1 − Loss%/100) You're subtracting the loss from what you paid.
Finding CP when SP and Profit% are given: CP = SP × 100 / (100 + Profit%) You're reverse-engineering the original price.
Finding CP when SP and Loss% are given: CP = SP × 100 / (100 − Loss%)
These four formulas handle 90% of all profit and loss questions. The trick is recognising WHICH two pieces of information the question gives you, then picking the right formula. Always label what you KNOW and what you NEED before you start calculating.
Marked Price, Discounts and the Real-World Shop Problem
Real interviews love adding one more layer: the concept of Marked Price (MP) and Discount. Here's where it gets interesting.
Marked Price (MP): The price tag on the shelf — what the seller ADVERTISES. Also called List Price.
Discount: A reduction given on the Marked Price. Discount is always calculated on the MP — not on CP.
SP = MP × (1 − Discount%/100)
The juicy interview question combines all three: a shopkeeper marks up the price above CP, then gives a discount — and you need to figure out the final profit or loss.
Here's the mental model: Imagine a shirt costs ₹500 (CP). The shopkeeper writes ₹800 on the tag (MP — a 60% markup). Then there's a sale: 25% discount on ₹800. The customer pays ₹600 (SP). The shopkeeper still made ₹100 profit on a ₹500 shirt. He gave a discount AND still profited. That's the trick these questions test.
Tricky Problem Types That Appear in Every Aptitude Test
Knowing the formulas is only half the battle. Aptitude tests throw a few classic curveballs that trip up even prepared candidates. Here are the three most common trap-style questions, fully worked through.
Type 1 — Two items, same SP, one profit one loss: Whenever a problem says 'two articles each sold at the same price, one at X% profit and one at X% loss' — there is ALWAYS a net loss. Always. This is a mathematical certainty.
Net Loss % = (Common %/10)² = X²/100
Type 2 — Dishonest shopkeeper using false weights: If a shopkeeper uses a 900g weight and claims it's 1000g, he's effectively gaining 100g per kg. Profit% = (True weight − False weight) / False weight × 100.
Type 3 — Successive profit/loss (buying then reselling): If you buy at CP, sell at a profit to Person B, and Person B resells at another profit, the final price chains multiplicatively — not additively.
Tricks and Shortcuts for Timed Exams
When the clock is ticking, longhand arithmetic is your enemy. Here are the mental math shortcuts that top scorers use to solve profit and loss problems in under 30 seconds.
Shortcut 1 — Net % for Markup + Discount: Net % = M − D − (M×D)/100. If positive, profit; if negative, loss.
Shortcut 2 — Loss when same SP and equal %: Net loss % = X²/100. Plug in X, get the loss percent instantly.
Shortcut 3 — False weight profit: Profit% = (Error/False weight) × 100, where Error = True weight − False weight.
Shortcut 4 — Fraction-to-percent conversion table: Memorise common fractions: 1/2 = 50%, 1/3 ≈ 33.33%, 1/4 = 25%, 1/5 = 20%, 1/10 = 10%. Many profit% values are simple fractions of CP.
Shortcut 5 — Single discount equivalent to multiple discounts: If two successive discounts d₁% and d₂%, single discount = d₁ + d₂ − (d₁×d₂)/100.
Practice these with real numbers until they become reflex. In an exam, the difference between a good score and a great score is often just how fast you apply these.
The Hidden Tax in Successive Discounts — Why Two 10% Offs Aren't 20% Off
Every junior dev thinks successive discounts add up. They don't. A 10% discount followed by another 10% discount is not 20% off. It's 19% off. Why? Because the second discount applies to the already-reduced price, not the original. This is the classic 'successive percentage' trap. It wrecks profit calculations in e-commerce pricing engines and inventory systems. The formula is simple: net discount = A + B - (A * B / 100). For 10% and 10%: 10 + 10 - (100/100) = 19%. Always compute the effective discount chain before setting final price. Your margin depends on it.
The False Profit of Dishonest Weights — How 900g as 1kg Bakes Your Margins
Selling 900 grams as a kilogram is the oldest trick in the book. It's also the most common coding mistake in point-of-sale systems that convert weight. The gain percent isn't the difference between 1000 and 900. It's (Error / Actual Given) 100. So for 900g: (1000 - 900) / 900 100 = 11.11%. Not 10%. This is the 'false weight' formula. It's asymmetric. Cheating by 100g on a 1kg sack yields a higher profit percentage than a 10% markup on the cost. Why? Because the loss is borne by the customer's quantity, not your cost. If you're building a billing system for a grocery chain, hardcode this check. It's a compliance audit flag.
Marked Price, Discount, and Profit Percentage Chain
In retail, the marked price (MP) is the price printed on the tag, while the selling price (SP) is what the customer actually pays after discounts. The profit percentage is usually calculated on the cost price (CP), but sometimes on SP. This section builds a chain: MP → Discount → SP → Profit% (on CP or SP).
Example: A shopkeeper marks an item at ₹2,00,000 and offers a 10% discount. The SP = MP × (1 - Discount%) = 2,00,000 × 0.9 = ₹1,80,000. If the CP is ₹1,50,000, profit = SP - CP = ₹30,000. Profit% on CP = (30,000/1,50,000) × 100 = 20%. Profit% on SP = (30,000/1,80,000) × 100 ≈ 16.67%.
Chain formula: SP = MP × (1 - d) where d is discount rate. Then profit% on CP = (SP - CP)/CP × 100. If profit% on SP is given, profit = (profit% on SP) × SP.
Tricky case: If a shopkeeper wants a profit of 20% on SP after giving a 10% discount, find MP. Let CP = ₹100. Desired profit on SP = 20%, so SP = CP/(1 - 0.2) = 100/0.8 = ₹125. Then MP = SP/(1 - 0.1) = 125/0.9 ≈ ₹138.89. So MP should be about 38.89% above CP.
Partnership and Profit Sharing Problems
Partnership problems involve two or more persons investing money in a business and sharing profits according to their investment and time. The profit is divided in the ratio of (capital × time).
Example: A invests ₹2,00,000 for 12 months, B invests ₹3,00,000 for 8 months. Profit at year-end is ₹1,20,000. A's share = (2,00,000 × 12) : (3,00,000 × 8) = 24,00,000 : 24,00,000 = 1:1. So each gets ₹60,000.
Variations: If partners join later or withdraw, adjust time accordingly. For example, A invests ₹2,00,000 for 12 months, B joins after 4 months with ₹3,00,000. A's capital-time = 2,00,000 × 12 = 24,00,000; B's = 3,00,000 × 8 = 24,00,000; ratio 1:1.
Tricky problem: A and B invest in ratio 3:2. A's capital is for 10 months, B's for 8 months. Profit is ₹50,000. Find each share. Let A's capital = 3k, B's = 2k. A's capital-time = 3k × 10 = 30k; B's = 2k × 8 = 16k; ratio = 30:16 = 15:8. A's share = (15/23)×50,000 ≈ ₹32,608.70; B's = ₹17,391.30.
Shortcut: If time is same, profit ratio = investment ratio. If investment same, profit ratio = time ratio.
Faulty Weights and Dishonest Shop Problems
Dishonest shopkeepers use faulty weights to cheat customers, selling less quantity than claimed. This creates hidden profit. The key is to compare the actual cost and selling price per unit weight.
Example: A shopkeeper uses a 900g weight as 1kg. He buys goods at ₹100/kg and sells at ₹120/kg (using faulty weight). What is his profit percentage?
Method: For every 1kg he claims to sell, he actually gives only 900g. His cost for 900g = 0.9 × 100 = ₹90. He sells that 900g at the price of 1kg = ₹120. So profit = 120 - 90 = ₹30. Profit% on cost = (30/90)×100 = 33.33%.
Formula: If the shopkeeper uses a weight of w grams instead of 1000g, and buys at CP per kg, sells at SP per kg, then profit% = [(SP - CP × (w/1000)) / (CP × (w/1000))] × 100. Alternatively, if he sells at CP but uses faulty weight, profit% = [(1000/w) - 1] × 100.
Example: He sells at cost price but uses 800g as 1kg. Profit% = (1000/800 - 1)×100 = (1.25 - 1)×100 = 25%.
Tricky case: He claims to sell at a discount but uses faulty weight. For instance, he marks MP at ₹150/kg, gives 10% discount, but uses 900g weight. CP = ₹100/kg. Find profit%. Effective SP per 900g = 150 × 0.9 = ₹135. Cost for 900g = ₹90. Profit = 45, profit% = 50%.
The 1% That Cost a Retail Chain ₹2 Lakh
- Always anchor percentage calculations to the cost price. The base of a percentage changes everything.
- When applying a discount, first compute profit on CP, then see how the discount affects SP relative to CP.
- A small conceptual error can compound into a significant financial loss at scale.
Profit% = (SP - CP) / CP × 100Loss% = (CP - SP) / CP × 100| File | Command / Code | Purpose |
|---|---|---|
| FoundationConcepts.txt | === PROFIT AND LOSS — FOUNDATION FORMULAS === | The Four Foundation Terms You Must Know Cold |
| MasterFormulaWorkthrough.txt | === WORKED PROBLEMS — ALL 4 FORMULA TYPES === | The Master Formula Sheet |
| MarkedPriceDiscountProblem.txt | === MARKED PRICE + DISCOUNT — COMBINED PROBLEM === | Marked Price, Discounts and the Real-World Shop Problem |
| TrickyProblemTypes.txt | === CLASSIC TRAP PROBLEMS — FULLY WORKED === | Tricky Problem Types That Appear in Every Aptitude Test |
| ShortcutsSummary.txt | === SHORTCUTS REFERENCE === | Tricks and Shortcuts for Timed Exams |
| successive_discount.py | def net_discount(d1: float, d2: float) -> float: | The Hidden Tax in Successive Discounts |
| false_weight.py | def false_weight_profit(claimed: float, actual: float) -> float: | The False Profit of Dishonest Weights |
| profit_chain.py | def find_mp(cp, discount_rate, profit_rate_on_sp): | Marked Price, Discount, and Profit Percentage Chain |
| partnership.py | def profit_share(capitals, times, total_profit): | Partnership and Profit Sharing Problems |
| faulty_weights.py | def faulty_weight_profit(cp_per_kg, sp_per_kg, actual_weight_g): | Faulty Weights and Dishonest Shop Problems |
Key takeaways
Interview Questions on This Topic
A shopkeeper marks his goods 30% above cost price and offers a 10% discount. Does he make a profit or loss — and by exactly what percentage? Walk me through every step.
Frequently Asked Questions
20+ years shipping production code across the stack, with years spent interviewing engineers. Written from production experience, not tutorials.
That's Aptitude. Mark it forged?
7 min read · try the examples if you haven't