Currency and number fields in Salesforce may round unexpectedly when the field length is set to 16 or more characters to the left or right of the decimal point with 2 decimal places. This rounding can also occur in whole number fields where the numeric value is longer than 15 digits.
The following examples show how values round when they exceed 15 significant digits:
These rounding behaviors occur with currency or number fields configured with 16 or more digits on either side of the decimal, or whole number fields with more than 15 digits.
JavaScript uses double-precision 64-bit floating-point numbers (IEEE 754 standard), which can only accurately represent integers up to 2^53 (approximately 9 quadrillion, or 9,007,199,254,740,992). Numbers larger than this threshold lose precision when processed in JavaScript.
Since Salesforce's Lightning Experience UI uses JavaScript to render field values, any number exceeding this threshold is subject to rounding when displayed or edited in the browser. This is a JavaScript platform limitation and is not specific to Salesforce — the same rounding occurs in any JavaScript environment, including browser developer consoles.
This rounding behavior is expected and by design. It occurs in the following contexts:
If a user saves a record with a rounded value via the UI, the rounded value is written to the database. If any validation rules require the original unrounded value to be unchanged, the rounding may trigger a validation error.
If your business requires precise numeric values exceeding 15 significant digits, consider the following options:
000394530

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.