Ringgit amounts, written out in Bahasa Melayu
Malaysian cheques, contracts, and bank forms write the amount in words alongside the figure. This tool converts a plain ringgit amount into correct Bahasa Melayu phrasing, spelling both the ringgit and the sen and closing with the customary “sahaja.”
How it works
The amount is converted to whole sen first to avoid binary floating-point error, then split into a major ringgit part and a minor sen part.
total_sen = round(amount × 100)
ringgit = floor(total_sen / 100)
sen = total_sen mod 100
Each part is spelled three digits at a time. Hundreds use “ratus” (seratus for 100), teens 11-19 use “belas” (sebelas for 11), and tens use “puluh.” The se- prefix replaces satu for 100 and 1,000 only. Scale words ribu, juta, bilion, and trilion mark the thousand, million, billion, and trillion groups. The ringgit phrase and the sen phrase are joined with “dan” (and), and “sahaja” (only) is appended.
Tips and example
Enter 1250.75 and you get “Seribu dua ratus lima puluh ringgit dan tujuh puluh lima sen sahaja.” Note seribu for 1,000 versus dua ribu for 2,000 — the se- shortcut applies only to a single leading unit. Rounding to whole sen means decimal entries never gain a spurious hundredth from floating-point math. For the closely related Indonesian system, see the Indonesian Currency in Words tool.