# Percentage calculator

### What is percentage

Percentage usually means the relative value from a total value. We use percentage for example like this:

1. Our total value here is one million cars.
2. And we say: "every second car is more than five years old"
3. Translated to percents - "every second car" means fifty percent (50%).
4. Correct answer is: half million of cars is older than five years.

One percent also means one hundredth. From above example - one hundredth (1%) from million would be one hundred thousand. $$x = \frac{1 000 000}{100} = 100 000 \\$$

#### Percentage formula

$$Percentage = Value / TotalValue \cdot 100 \\[1ex]$$
Example: How many percent is 5 cars out of 10 cars
$$Percentage = (5 / 10) \cdot 100 \\ Percentage = 50\%$$

#### Value formula

$$Value = Percentage \cdot (TotalValue / 100) \\[1ex]$$
Example: How many cars is 10% of 50 cars
$$Value = 10 \cdot (50 / 100) \\ Value = 5 \, cars$$

#### Total value formula

$$TotalValue = Value \cdot (100 / Percentage) \\[1ex]$$
Example: What is TotalValue if 5 cars is 50%
$$TotalValue = 5 \cdot (100 / 50) \\ TotalValue = 10\; cars$$