Category: FUNCTION | Updated: 2026-11-22
How to Use the ABS Function in Google Sheets
Syntax
=ABS(value)
- value: The number or cell reference whose absolute value you want to find.
Example
Here is an example of calculating the variance (gap) between target and actual figures without a plus or minus sign.
| Item | Target (Col A) | Actual (Col B) | Formula (Col C) | Result (Variance) |
|---|---|---|---|---|
| Store A | 1000 | 1250 | =ABS(A2-B2) |
250 |
| Store B | 1000 | 820 | =ABS(A3-B3) |
180 |
| Store C | 1000 | 1000 | =ABS(A4-B4) |
0 |
Common Errors and Notes
- Negative Time Calculations: In Google Sheets, subtracting times that result in a negative value can display
###or an error, but using=ABS(end_time - start_time)safely returns the absolute time difference. - #VALUE! Error: If the referenced cell contains text, an error occurs, so combine with
IFERRORwhen needed.
Frequently Asked Questions
Q. How do I always display the difference between budget and actual as a positive number?
A. Wrap the subtraction in ABS, like "=ABS(budget - actual)", to get a positive number (the magnitude of the variance) regardless of whether the difference is positive or negative.
Q. What happens if I pass text to the ABS function?
A. Passing text that cannot be converted to a number returns a "#VALUE!" error. However, numeric strings like "100" are automatically evaluated as numbers.