EDUCBA

EDUCBA

MENUMENU
  • Blog
  • All Courses
  • All in One Bundle
  • Login
Home Excel Excel Resources Maths Function in Excel Trunc in Excel

Trunc in Excel

Madhuri Thakur
Article byMadhuri Thakur

Updated May 9, 2023

TRUNC in Excel

Definition of Trunc in Excel

Trunc is also known as the Truncate function in Excel. It is considered one of the mathematical and trigonometrical functions of Excel. The output returned by this function is a numeric value. The syntax for this simple function is =TRUNC( number, number of digits). Out of these two parameters, the first argument is mandatory, and the second argument is optional. The first argument is the input we provide to the function, which is the number to be truncated, and the second argument is the number of digits we want displaying in a decimal value input. Let us discuss what these two arguments are.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

How to Use Trunc in Excel?

The Trunc function is similar to the INT function in Excel because both functions give us the result for the integer part of the number. The Trunc function has two arguments where one is mandatory, and one is optional. The mandatory argument is the integer input.

You can download this Trunc Excel Template here – Trunc Excel Template

Example #1

Let us review our basic example to learn how to use Excel’s Trunc or truncate functions. Let’s assume we have a value of 2.1 in cell A1 as shown below:

Trunc in Excel 1-1

We have value in cell A2; let us use the function in cell B2 as follows:

Trunc in Excel 1-2

We know that the first argument is mandatory, which is the number we want to truncate, so select cell A2 for the following argument:

Trunc in Excel 1-3

The second argument is optional, which is given when we need to remove a part of the number, which can be a fractional part of the decimal part, so that we can close the parenthesis.

Trunc in Excel 1-4

When we press the Enter key, we will have our final result as shown below:

Trunc in Excel 1-5

Example #2

For this example, we have a bunch of numbers that are in decimal parts, and they are positive integers; we will use a truncate function for these numbers as shown below:

Trunc in Excel 2-1

Let us use the number of digits to be truncated as 2.

In cell B2, type the following formula shown in the screenshot below.

Trunc in Excel 2-2

Please select the number from cell A2, as shown in the screenshot below.

Trunc in Excel 2-3

Now, after the number, put a comma and type 2 for the number of digits to be truncated, as shown below:

Trunc in Excel 2-4

Press Enter Key and see the result.

Trunc in Excel 2-5

Copy the formula and drag it to the last cell, as shown below.

trunc excel 2-1

The values in cell B2 are the truncated numbers truncated to the two digits from the original number.

Example #3

In the previous example, we used positive integers to show how the trunk function works. Now let us see if we will get the same result for the negative integers. We have the following number in cell A2, as shown below.

Positive Integers

Again let us use the number of digits to be truncated as 2. In cell B2, type the following formula shown in the screenshot below.

Positive Integers 1

Please select the number from cell A2, as shown in the screenshot below.

Positive Integers 2

Now, after the number, put a comma and type 2 for the number of digits to be truncated, as shown below:

Positive Integers 3

Press Enter Key and see the result.

Positive Integers 4

Copy the formula and drag it to the last cell, as shown below.

trunc excel 2-2

In column B, we have the desired result from the Truncate function.

Example #4

Now there is one example when we get data from some external source, and the date from the source has a timestamp attached. So can we use the Trunc function to extract the date from the timestamp? Let us find out. I have the below dates in the timestamp format.

In cell C1, type the following formula as shown in the screenshot below:

Extract the Date 1

For the number argument, select cell A1.

Extract the Date 2

For the number of digits to be truncated, select cell B1; since it is blank, it will be considered 0.

Extract the Date 3

Press Enter Key and see the result.

Extract the Date 4

Copy and drag the formula to cell C7, as shown in the screenshot below.

trunc excel 2-3

We have successfully extracted the date using the Trunc function from the data.

Things to Remember

  • The Trunc function is one of the mathematical and trigonometrical functions of Excel.
  • INT and TRUNC functions are similar.
  • The values returned by this function are numeric.
  • The Trunc function is categorized under the mathematical and trigonometrical functions of Excel. This function returns a number to a specified number of digits. This function gives us a numerical value.

Recommended Articles

This is a guide to Trunc Function in Excel. We discuss using Trunc Function in Excel, practical examples, and a downloadable Excel template here. You can also go through our other related articles –

  1. User-Defined Function in Excel
  2. Time Function in Excel
  3. SUM Cells in Excel
  4. SUMIF Formula in Excel
All in One Excel VBA Bundle
500+ Hours of HD Videos
15 Learning Paths
120+ Courses
Verifiable Certificate of Completion
Lifetime Access
Financial Analyst Masters Training Program
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
All in One Data Science Bundle
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
All in One Software Development Bundle
5000+ Hours of HD Videos
149 Learning Paths
1050+ Courses
Verifiable Certificate of Completion
Lifetime Access
Primary Sidebar
All in One Excel VBA Bundle500+ Hours of HD Videos | 15 Learning Paths | 120+ Courses | Verifiable Certificate of Completion | Lifetime Access
Financial Analyst Masters Training Program2000+ Hours of HD Videos | 43 Learning Paths | 550+ Courses | Verifiable Certificate of Completion | Lifetime Access
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download Trunc Excel Template

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Trunc Excel Template

EDUCBA

डाउनलोड Trunc Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more