## Percentage calculator

### Calculation results

Number 1 == X% of Number

Number == X% of Number 1

Number 1 == Number * X%

Number == Number 1 * X%

Number 1 == nombre 2 -X%

Number 1 == Number +X%

Number - X% == Number before discount applied or without VAT

Number - X% == Number discounted or of taxes

Number VAT included - X% of taxes == Number without VAT

Number VAT included - X% without VAT == Number of taxes

Number without VAT + X% of taxes == Number VAT included

X% of taxes of Number without VAT == Number of taxes

Number + X% of Number == Number

X% of Number == Number

Number -X% of Number == Number

X% of Number == Number

## Calculation formulas of percentage

### How to calculate the percentage difference between two numbers?

The percentage between deux nombres is such a factor that we will scale up to 100 to be humanly more readable and understandable. We get this factor by dividing them.

#### Calculating formula to get the multiplying factor

Number 1 / Number 2 = multiplying factor of Nombre 2 to get the Number 1

Exemple :
25 / 50 = 0,5
Value of 0,5 will make possible from 50 to find out 25.
50 * 0,5 = 25

It is from this multiplying factor that we are going to find out the corresponding percentage.

#### Percentage calculating formula

(Number 1 / Number 2) = multiplying factor
The percentage = gotten multiplying factor * 100

Exemple :
20 (Number 1) / 80 (Number 2) = 0,25 (factor)
Corresponding percent = 0,25 (factor) * 100 == 25 (results in percentage)
20 is so 25% of 80

The final formula :
(Number 1 / Number 2) * 100

### How to calculate the substract percentage (exemple for the discounts) ?

The substracting percentage is equivalent of a percentage substraction on a number, to obtain a result like -X%.
We will take as exemple the case with a Price A (before discount) and a Price B (when discounted)

#### Calculation formula to get the percentage between those two prices

Price 1 / Price 2 = multiplying factor of Price 2 to get the Price 1. (discount percentage formula)

Exemple :
45\$ / 50\$ = 0,9
Value of 0,9 will make possible from 50 to find out 45.
Because 50 * 0,9 = 45

That means 45 == 90% de 50
50 represents 100% so it is like 100%(50\$) - 90%(45\$) == 10% (5\$)

#### Formula to calculate the price before discount

As an exemple, from Price 1 (before discount) of 50\$, for which we have a discount applied of 10%.
From the discount percentage, we have to find the corresponding multiplying factor in order to do the math.

Discount factor applied = 1 - (discount percentage / 100)
Price B = Price A * discount factor applied

* Price A is the original price before a discount is applied
* Price B is the final selling price

Exemple :
10% = 1 - (discount percentage / 100)
10% = 0,9
Price A * 0,9 = Price B
50\$ * 0,9 = 45\$

Final formula is :
Price A (before discount) * (discount percentage / 100)

#### Formula to get the original price of the product before a discount has been applied

In the case of a Price B (after discount) of 45\$, on which we had a 10% discount applied.
From the discount percentage we are have to find out the multiplying factor to be able to do the math.

Discount factore applied = 1 - (discount percentage / 100)
Price B (after discount) = Price A (before discount) * discount factor
Price A (before discount) = Price B (after discount) / discount factor

Exemple :
10% = 1 - (discount percentage / 100)
10% = 0,9
Price A (before discount) = Price B / 0,9
50\$ * 0,9 = 45\$

The final and complete formula is :
(Price B / (1 - (discount percentage / 100)))