To_Percent function in Google Sheets is equivalent to its percent formatting via Format > Number > Percent formatting. That means this function is just for formatting numbers to the percentage (%) equivalent.
In formulas that returning proportionate part of a total, to express the proportionate part, we can use the To_Percent function.
Syntax:
TO_PERCENT(value)
Argument:
value – the number or reference to a cell to format to percent. If the value is not a number (as in the below formula), the To_Percent function will return the value without any formatting.
=to_percent(#N/A)
Result: #N/A
Examples to Google Sheets To_Percent Function:
Real-Life Use of the To_Percent Function in Google Sheets
If you are looking for a real-life example to the To_Percent in Google Sheets, we can consider a sales percentage calculation.
A | B | |
1 | Gross Sales Amt. Q1, 2019 | 16,800.00 |
2 | Gross Sales Amt. Q2, 2019 | 22,400.00 |
3 | Difference (Q2-Q1) | 5,600.00 |
4 | Sales Percentage (Difference/Q1) | 0.33 |
As per this example, there is a 33% increase in sales in Q2 compared to the sales in Q1.
To convert the provided sales percentage number, i.e. 0.33, in cell B4 to a percentage value, you can either use the To_Percent function or the format menu Percent format. Using the To_Percent, the formula will be as follows.
=to_percent(B3/B1)
There is a chance of wrongly using the function Unary_Percent with To_Percent. See how they differ.
Comparison: To_Percent Vs Unary_Percent
I have detailed the To_Percent function above. To understand the difference of this function with Unary_Percent you may please go thru’ the below formulas.
Hope you could understand the difference between the functions To_Percent and Unary_Percent.
The former function converts a provided number to a percentage value whereas the latter function returns a value interpreted as a percentage. Still having any doubt?
For example, To convert 20 to 20% (0.2) use the Unary_Percent function. To convert 0.2 to 20% (just formatting of number) use the To_Percent function.
You can check my function guide for tutorials on more Google Sheets functions.