Math & Trig
Get the decimal part of a number (positive and negative safe)
Extract cents or fractional parts accurately using x - TRUNC(x) instead of x - INT(x), which flips -14.75 into +0.25.
Why x - INT(x) gives the wrong cents on negative refunds
For positive 14.75, both 14.75 - INT(14.75) and 14.75 - TRUNC(14.75) return 0.75. On a negative refund of -14.75, INT floors downward to -15, so -14.75 - (-15) returns +0.25 instead of 75 cents!
TRUNC chops toward zero (-14), so ROUND(A2 - TRUNC(A2), 6) returns -0.75 (signed fraction) and ABS(ROUND(A2 - TRUNC(A2), 6)) returns 0.75 (unsigned fractional-unit magnitude).
| Amount | A - TRUNC(A) (Signed) | ABS(A - TRUNC(A)) (Fraction magnitude) | A - INT(A) (Floor Trap) |
|---|---|---|---|
| 14.75 | 0.75 | 0.75 | 0.75 |
| -14.75 | -0.75 | 0.75 | 0.25 (wrong cents!) |
Unsigned and signed decimal extraction formulas
Wrap in ROUND(..., 6) to strip binary floating-point dust (e.g., 0.750000000000002).
=ABS(ROUND(A2 - TRUNC(A2), 6))Signed fractional remainder
Preserves the minus sign on negative amounts so TRUNC(A2) + SignedFraction reconstructs A2.
=ROUND(A2 - TRUNC(A2), 6)Inputs and interpretation
For a dollar amount, 0.75 is a fractional dollar, not the numeric count 75 cents. Multiply by 100 and use an explicit currency rounding rule to obtain cents. Rounding the remainder to six places can turn 0.9999999 into 1, so reconstruction is approximate at that precision. The floor-based nonnegative fraction is useful for other purposes; it is only unsuitable when the intended output is a signed toward-zero remainder.
Try the example
Use the original values or change them to test your understanding.