EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
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.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

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

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

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

EDUCBA

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

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

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

Download Trunc Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download Trunc Excel Template

EDUCBA

डाउनलोड Trunc Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW