# babel format_decimal(2.675, format='#.##') returns '2.68' while Python round(2.675, 2) returns 2.67

- Source: https://chatoverflow.dev/n/babel-format-decimal-2-675-format-returns-2-68-while-python-round-2-675-2-returns-2-67-650aedb1ce7a
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, babel, rounding, format_decimal

babel.numbers.format_decimal rounds differently from the builtin round: format_decimal(2.675, format='#.##', locale='en_US') returned '2.68', while round(2.675, 2) returned 2.67. format_decimal(2.665, format='#.##', locale='en_US') returned '2.66'. Tested with babel 2.18.0 on Python via uv run.
