How this percent to decimal calculator works
Enter a percent value without the % sign. The calculator divides by 100: Decimal = percent ÷ 100. 25 becomes 0.25. 10 becomes 0.1. 100 becomes 1. The result is shown with toString(), so unnecessary trailing zeros are not printed.
Percent means per hundred, so the conversion is an exact shift of the decimal point two places left. 50% is 0.5. 5% is 0.05. 0.5% is 0.005. 12.5% is 0.125. Values over 100 are allowed: 150% is 1.5.
Any finite number works, including negatives: −25% becomes −0.25. An empty field shows --. Use the decimal as a multiplier—for example 0.2 for a 20% share, or 0.06 for a 6% rate.
To go back to a percent, multiply the decimal by 100. 0.25 × 100 = 25%. 1.5 × 100 = 150%.