# Round decimal number in ArcGIS10.1

How can I round the decimal number in a table in Arcmap:

e.g.

how can I set it to 2.60?

-

you can right click on the field name, click Properties, then press the ... next to Numeric and finally "rounding". You will then be able to format your number as you wish (well, it will be 2.61).

EDIT:

Just to make things clear, my initial answer is for visual rounding because field calculator was not mentioned in the question (I've added the tag). Now I have a few remarks.

Note that if you store your values in float, the "permanent" rounding may leave you with something like 5.599999999999996 (see here) because of the precision of the storage. So you might still want some "visual" rounding for display.

The second thing, as I mentioned, is that the rounding will bring you to the closest rounded value, but you seem to be looking for the floor. To solution would then be

``````math.floor(!fieldname!*100)/100 # 2.60855654 --> 2.60
``````

Finally, if you want rounded values in a field, I recommand you to manage your field in order to store a given level of precision. When you add your new field, you can set the "precision" to the number of significant digit (in your case 5), and the "scale" to the number of decimal digits (in your case, 2). The rounding will then be automatic.

-
+1 Nice, simple solution. Although, the process should be: right-click field name > Properties... > Numeric ... > Rounding – Aaron Mar 14 '14 at 15:24
+1 for pointing out what the ACTUAL value will be.. – evv_gis Mar 14 '14 at 15:26
mpianka is right. the numeric value will remain the same. – KDot1254 Mar 16 '14 at 21:28

The previous answer will round the number in ArcMap, but it does not actually change the numeric value. For example if you were to export the table to an Excel spreadsheet, the number would still read 2.6085...

To permanently round numbers to the nth value, use the following Python code in the Field Calculator:

round ( !FIELDNAME!, n)

-
Doesn't work using ArcGIS 10.1 with Python 2.7 – PROBERT Jul 23 '14 at 16:06
round(float([FIELDNAME]), n) works. Replace n with number of decimals – Tristan Forward Aug 27 '15 at 15:18