Updated January 2023: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
- Download and install the repair tool here.
- Let it scan your computer.
- The tool will then repair your computer.
The TRUNC function is a mathematical and trigonometric function in Excel. It removes the fractional part of a number and truncates a number into an integer. It was introduced in MS Excel 2007.
In financial analysis, the function can be used to truncate a number to a specific precision. It is also useful for extracting date and time values from data.
The syntax of the TRUNC function in Microsoft Excel is as follows
TRUNC( number, [digits] )
Parameters or arguments
The number to cut.
Optional. This is the number of decimal places to be displayed in the resulting truncated number. If this parameter is omitted, the TRUNC function takes the value 0.
Function TRUNC returns a numeric value.
TRUNC Function Example
Copy the sample data from the following table and paste it into cell A1 of a new Excel spreadsheet. If you want the formulas to display the results, select them, press F2 and then choose Enter. If necessary, you can adjust the width of the columns to display all the data.
Truncates 8.9 to return the integer part (8).
Truncates a negative number to return the integer part (-8).
Truncates a number between 0 and 1, returning the integer part (0).
The TRUNC function does not round a number, but simply truncates it as shown. The function can also be used to return a number of decimal places without rounding with the num_digits argument. For example, =TRUNC(PI(),2) returns the truncated pi value to two decimal places, i.e., 3.14, and =TRUNC(PI(),3) returns the truncated pi value to three decimal places, i.e., 3.141.
Deleting the time of a date-time stamp
A useful example of TRUNC is the deletion of the time from a date and time stamp in Excel.
Imagine that you have the following date/time stamps, but we only want the date in one column for the evaluation.
The following formula can be used to delete the time
Although the time is removed, the resulting cells still need to be formatted as a date only.
Analyzing Excel data is difficult enough without having to deal with decimal numbers. Although it is possible to round up or down in Excel, this does not necessarily change the data – it only changes the way it is displayed.
If you want to delete or directly define the number of decimal places in a number, you must use the TRUNC function. Learn how to use the TRUNC function in Excel.
We hope that this tutorial has been helpful in using the TRUNC function in Excel. Cheers!
Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here
CCNA, Web Developer, PC Troubleshooter
I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.