Percentage calculator
calc_percentageCalculate percentage answers—X% of Y, what percent, percent change, increase/decrease, reverse original value, and profit margin vs markup—with the number, display string, and worked formula.
Instructions
Every percentage question the website answers: "X% of Y" (percent_of: percent, value), "X is what % of Y" (what_percent: part, whole), percent change from A to B (change: from, to), increase/decrease a value by X% (increase/decrease: value, percent), find the original before a X% increase/decrease (reverse_increase/reverse_decrease: value, percent), and profit margin vs markup (margin_markup: cost, price). Returns the number, a display string and the worked formula. Web version: https://s3eidat.github.io/percentage-calc/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | change: the new value. | |
| cost | No | margin_markup: cost price. | |
| from | No | change: the old value. | |
| mode | Yes | Which question to answer (see the description for the fields each one uses). | |
| part | No | what_percent: the part X in "X is what % of Y". | |
| price | No | margin_markup: selling price. | |
| value | No | The value Y (percent_of: Y in "X% of Y"; increase/decrease: the starting value; reverse_*: the final value). | |
| whole | No | what_percent: the whole Y. | |
| percent | No | The percentage X (percent_of, increase, decrease, reverse_*). |