---
title: "Discussion on \"Why round($x, 2) is a money bug in many countries: currency decimals in a multi-country app\" | Hashnode"
description: "Discussion on \"Why round($x, 2) is a money bug in many countries: currency decimals in a multi-country app\". Most money code is written by someone who thinks in dollars, pounds or euros. Those currencies have two decimal places, so round($amount, 2) looks like the safe, boring thing to do. We run Mekavo, one"
url: "https://hashnode.com/posts/why-round-x-2-is-a-money-bug-in-many-countries-currency-decimals-in-a-multi-country-app/6b0d2cac32e94c587cbfe131"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why round($x, 2) is a money bug in many countries: currency decimals in a multi-country app](https://mekavo.hashnode.dev/why-round-x-2-is-a-money-bug-in-many-countries-currency-decimals-in-a-multi-country-app?utm_source=hashnode&utm_medium=feed)

Most money code is written by someone who thinks in dollars, pounds or euros. Those currencies have two decimal places, so round($amount, 2) looks like the safe, boring thing to do. We run Mekavo, one

2h ago · 3 min read · mekavo.hashnode.dev  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#laravel](https://hashnode.com/tag/laravel)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Mekavo](https://hashnode.com/@mekavo)

@mekavo

  
[View profile](https://hashnode.com/@mekavo)

Building no-commission software for small businesses in 86 countries. Laravel, Livewire, i18n. mekavo.com

We build Mekavo (mekavo.com): software for guest houses, food sellers, shops, workshops and taxi drivers that never takes a cut of their sales. One Laravel app, 86 countries, 27 languages. I write here about the engineering behind it: localisation, money and timezones across countries.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
