Smart Percentage Calculator
Calculate Percentages Accurately and Instantly
What is
%
of
?is what
%
of
?%
is
% of what?
What is the percentage change
from
to
?
%
๐ฏ Application Purpose
This is an interactive percentage calculator built with React, containing 4 main modules:
- Calculate how much X% of Y is.
- Find out what percent X is of Y.
- Determine X is Y% of what value.
- Calculate percentage change between two values.
๐ฆ Features Structure and Usage
๐ข Module 1: "What is X% of Y?"
For example, if you want to know what 10% of 150 is:
- Enter X = 10 in the first input.
- Enter Y = 150 in the second input.
- Click the Calculate button.
- The output will appear in the result area, for example,
15
.
Formula used:
result = (percent / 100) * base
๐งฎ Module 2: "X is what % of Y?"
For example, to find out what percent 15 is of 150:
- Enter X = 15 (value to compare).
- Enter Y = 150 (total value).
- Click Calculate.
- The result will show, e.g.
10%
.
Formula used:
result = (part / whole) * 100
โ Module 3: "X is Y% of what?"
If you know 1000 is 10% of some value, and want to find that value:
- Enter X = 1000 (partial value).
- Enter Y = 10 (percentage).
- Click Calculate.
- The result will show the total value, e.g.
10000
.
Formula used:
result = (part / percent) * 100
๐ Module 4: "Percentage change from A to B?"
To calculate percentage change between two values (e.g., from 100 to 120):
- Enter Old value = 100.
- Enter New value = 120.
- Click Calculate.
- The result will be
20%
(since it increased by 20 from 100).
Formula used:
result = ((newValue - oldValue) / oldValue) * 100
๐น๏ธ Additional Features
- โจ๏ธ Keyboard Shortcut: Press
Enter
to calculate math expressions from the top inputs (using mathjs evaluate function). - ๐งพ History: All calculations are saved in the history panel, including manual and percentage module results.
- ๐ Undo/Redo: Logic is prepared for undo/redo stacks (not yet active in UI).
๐งช Testing Tips
Try these test inputs for each module:
- Module 1: 25% of 200 โ Result: 50
- Module 2: 50 of 200 โ Result: 25%
- Module 3: 50 is 25% of what? โ Result: 200
- Module 4: from 150 to 180 โ Result: 20%