---
title: "Decimal values are not rounding correctly"
date: "2021-05-26T15:58:02+00:00"
summary: "Discover why decimal values aren't rounding correctly in Drupal and learn how to fix it. Understand the impact of PHP's serialize_precision setting on configuration exports and syncing across environments."
image:
type: "article"
url: "/drupal-starter-kits/add-ons/site-studio/help/64831-decimal-values-are-not-rounding-correctly"
id: "0566d8f2-34e7-4634-b568-343e967e78fc"
---

This is due to the value of the serialize\_precision PHP setting.

Inputting a decimal value, in something like a CSS value, can be saved with multiple decimal places rather than what the user input. The value displays correctly in the UI, but when exporting the configuration the value has multiple decimal places, this is due to the serialize\_precision PHP setting. This can cause unnecessary conflicts with configuration when exported and committing to code.

It is recommended that environments where configuration is synced that the same serialize\_precision value is set.

The PHP default value of serialize\_precision prior to 7.1.0 was 17, on later versions of PHP the default is now -1. The value of the setting can be seen in your Drupal sites Status report. It can be overridden in your settings.php or php.ini.