How Our Calculations Work
PercentScope uses standard arithmetic formulas implemented in TypeScript and evaluated in your browser.
Core percentage formulas
P% of Y = (P ÷ 100) × Y
X as a percent of Y = (X ÷ Y) × 100
Percentage change = (new − old) ÷ |old| × 100
Percentage difference = |A − B| ÷ ((|A| + |B|) ÷ 2) × 100
Discounts
Successive discounts are applied one after another. They are not simply added together because each discount uses the remaining price as its base.
Margin and markup
Margin divides profit by selling price. Markup divides profit by cost. The distinction is shown on both calculators.
Testing
The project includes unit tests for core formulas and a QA checklist covering zero denominators, negative changes, 100% reductions, stacked discounts, printing, sharing and mobile navigation.