# Rounding data in Tecplot 360 or Focus

Problem:

How can I quickly round data to a specified level of precision in Tecplot 360 or Focus?

Solution:

The “round” function can be used to round the values of a variable and either store the result in the existing variable or create a new variable.
After loading your data, go to Data > Alter > Specify Equations and enter the following equation:

{RoundedData} = round({Data})

In this example, a new variable named Data is rounded to the nearest whole number and stored in variable RoundedData. You can round more precisely using an equation of the following form:

{RoundedData} = round({Data}*10)/10

In this example, Data is rounded to the nearest tenths digit (0.26 would be rounded to 0.3) and stored in variable RoundedData.  The round function always rounds to the nearest whole number so by multiplying Data by 10 before rounding, the tenths digit is temporarily shifted to the ones digit.  After rounding, Data is divided by 10 to rescale it properly.  This method could be employed to round to other digits by altering the scale factor.