Number Truncation Calculator
Truncating a number cuts off its digits after a chosen decimal place without rounding, always moving the value toward zero. It is how computers convert a decimal to an integer, how fixed-point currency drops extra fractions, and how you keep just the part of a number you care about. This tool truncates any number to the number of decimal places you set, and also reports the discarded fractional part and the integer part on its own. Unlike rounding, truncation never increases the magnitude, since it simply discards the trailing digits.
Truncation formula
Scale factor = 10^d (d = decimal places to keep)
Truncated value = trunc(x * scale factor) / scale factor
Discarded amount = x - truncated value
Here x is your number and d is the number of decimal places to keep. The trunc operation removes the fractional part toward zero, so positive and negative numbers both shrink in magnitude.
How truncation works
- Truncation discards digits beyond the chosen place without rounding.
- It always moves toward zero, never increasing the magnitude of the number.
- For positive numbers truncation equals the floor; for negatives it equals the ceiling.
- Setting decimal places to zero truncates to the integer part.
- Many programming languages truncate when converting a float to an integer.
Truncation: frequently asked questions
What does it mean to truncate a number?
Truncating a number means cutting off its digits after a chosen place without rounding. Truncating 3.789 to one decimal place gives 3.7, simply discarding the 89, whereas rounding would give 3.8. Truncation always moves toward zero, so it never increases the magnitude of the number.
How is truncation different from rounding?
Rounding looks at the discarded digits and may increase the last kept digit, moving to the nearest value. Truncation ignores the discarded digits entirely and just chops them off, always moving toward zero. For positive numbers truncation equals the floor; for negative numbers it equals the ceiling.
How does truncation handle negative numbers?
Truncation always moves toward zero, so truncating -3.789 to the integer gives -3, not -4. This differs from the floor function, which would give -4. The calculator truncates the magnitude and reattaches the sign, so negative numbers shrink in magnitude just like positive ones.
Can I truncate to a whole number?
Yes. Set the number of decimal places to zero to truncate to the integer part, discarding everything after the decimal point. Truncating 9.99 to zero decimal places gives 9. The calculator also reports the integer part separately for convenience whatever decimal-place setting you choose.
Where is truncation used in practice?
Truncation appears in integer division and modulo operations, in fixed-point currency handling where extra digits are dropped, in array indexing, and in any setting where digits beyond a certain place must be discarded rather than rounded. Many programming languages truncate when converting a float to an integer.
Official sources
- National Institute of Standards and Technology: Digital Library of Mathematical Functions: notation and algebra.
- National Institute of Standards and Technology: Statistical and computational reference.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.