Set number precision ​

Precision is the number of decimal places that ERPNext uses for numbers. Set one precision for the whole site, and change it for one field only when a real price or measurement needs more detail.

For example, a company buys cable at USD 1.2375 per meter. With two decimal places, users see USD 1.24. With four decimal places on the rate field only, users see the real price, and totals keep two decimal places.

Prerequisites ​

  • The System Manager role.

Set the precision for the site ​

  1. Open System Settings.
  2. In Float Precision, select the decimal places for quantities, conversion factors, and other numbers that are not amounts.
  3. In Currency Precision, select the decimal places for rates and amounts. If you leave it empty, ERPNext uses the number format.
  4. Check Rounding Method. It decides how a value that is exactly halfway, such as 2.345, is rounded.
  5. Save.
SettingExampleResult
Float Precision = 3Quantity 1.275Shows three decimal places.
Currency Precision = 2USD 699.50Shows cents.
Currency Precision = 4Rate USD 1.2375Shows prices below one cent.

Set the precision for one field ​

  1. Open Customize Form.
  2. Select the document, for example Purchase Order Item.
  3. In the fields table, open the field, for example Rate.
  4. In Precision, select the decimal places.
  5. Save, and reload the page.

Learn more about Customize Form.

Check the result ​

Create a draft document with the values that need the precision, for example a Purchase Order with quantity 1,250 and rate 1.2375. Check the rate, the amount, the taxes, the rounded total, the print format, and the general ledger after you submit it. Displayed decimals alone do not prove that the posted value is right.

Troubleshooting ​

A field still shows fewer decimals ​

The field can have its own precision, or its currency can control the format. Check the field in Customize Form, then reload.

A total differs from a manual calculation ​

Compare the quantity, the conversion factor, the rate, the tax precision, the smallest currency fraction, the rounded total, and the rounding method. Do not add decimals to hide a policy difference. See Invoice rounding issue.

A report shows another precision than the form ​

A report can format its columns with its own precision or with the currency format.

Old documents did not change ​

Changing the precision changes how values appear. It does not recalculate submitted documents.