// notes/

Discounts

Coding tips and build notes by Mahir Faysal, a student web developer in Bangladesh: tested Python, HTML, CSS, JavaScript and PHP tutorials, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.

How to Calculate Stacked Discounts: Why 20% Off Then 10% Off Isn't 30%
Learning notes

How to Calculate Stacked Discounts: Why 20% Off Then 10% Off Isn't 30%

Stacked discounts multiply rather than add. To find the final price, multiply the original price by (1 − first discount) and then by (1 − second discount). So 20% off followed by an extra 10% off gives 0.8 × 0.9 = 0.72 of the price, which is 28% off, not 30%.

October 18, 2026 · 10 min read · 2 views

// filter

You are inside a slice of the notes.

This view is only the category, tag, or search you asked for. Sample warnings still apply on any article that carries them. Drafts are still hidden. The full list is the learning notes page, which also explains how a note is written and why some posts are marked Sample.