How-to guidesHow-to

Round converted amounts to each currency's decimals

Convert EUR to JPY, USD and KWD, then round once

29 Oct 2026 · 3 min read

Multiply the EUR amount by the destination currency's rate at full precision, then round the result to that currency's minor unit. JPY uses 0 decimals, USD uses 2 and KWD uses 3. Keep the rate exactly as returned through the multiplication.

Get the rates for one EUR

Run the sample request to get JPY, USD and KWD rates for one EUR. The API quotes every currency against USD. Use the returned rates for the EUR conversions, and preserve their full precision when you calculate each destination amount.

Every latest response carries source, market_session, timestamp, data_updated_at and rates, plus the notice "Indicative rates, not for settlement." The example numbers come from the response at 29 Oct 2026, 07:04 UTC, its data_updated_at. Keep that response time with the rates when you check your calculations.

Shell
curl "https://api.exchangerate.dev/v1/latest/EUR?symbols=JPY,USD,KWD"

Multiply before rounding

Use full amount = EUR amount × destination currency per EUR. The rate must describe the currency you want to receive per EUR, so multiplying an amount in EUR gives an amount in that destination currency.

Never round the rate before multiplying. For a conversion of 1,000 EUR, use the entire returned rate in the calculation. Keep the converted amount at full precision until you apply the destination currency's decimal rule; rounding the input rate changes the calculation before that final step.

Use the destination currency's decimals

Apply rounded amount = round(full amount, currency decimals) after the multiplication. The ISO 4217 minor units are 0 decimals for JPY, 2 decimals for USD and 3 decimals for KWD. The destination currency determines the precision of the final amount.

For JPY, round to whole yen. For USD, round to 2 decimal places; for KWD, use 3. An amount that starts in EUR still follows the destination currency's minor unit after conversion. Apply this rule to the converted amount at the end.

Convert 1,000 EUR into each currency

At 29 Oct 2026, 07:04 UTC, the example response returns 175.843 JPY, 1.11388 USD and 0.34639 KWD per EUR. Each calculation uses 1,000 EUR and its returned rate. The EUR to JPY rate comes from one EUR request, so its last digit can differ from the cross-rate guide, which rounds each USD rate before dividing.

Read each row from the full precision multiplication to the rounded destination amount. The calculation column retains the result before currency rounding. The final column applies the ISO 4217 minor unit for that row's currency, so its decimal precision depends on the destination.

CurrencyCalculation (full precision)Rounded
JPY, 0 decimals1,000 × 175.843 = 175,843.000000175,843
USD, 2 decimals1,000 × 1.11388 = 1,113.8800001,113.88
KWD, 3 decimals1,000 × 0.34639 = 346.390000346.390

Keep intermediate amounts at full precision

Rounding each leg of a conversion chain separately causes drift. Carry full precision through the intermediate calculations, then round only the amount you show or pay. The same rule applies to the rate: preserve it through multiplication instead of shortening it before use.

In a chain, an intermediate converted amount becomes an input to the next conversion. Leave that input at full precision. When you reach the amount you will show or pay, apply the minor unit of its destination currency once.

Account for rate timing and fees

Keyless calls allow 10 requests a minute and 100 an hour per IP, with rates 15 minutes late. A free key has 5,000 requests a month and 10 requests a minute. Free rates are also 15 minutes late; paid plans are live.

The rates are indicative mid-market figures, not for settlement or trading. Banks, cards and transfer services apply their own spread and fees. Rounding a conversion to the currency's minor unit does not account for those spreads or fees.

Questions

Should I round the rate or the converted amount?

Round the converted amount once, after multiplication. Keep the returned rate at full precision throughout the calculation. The destination currency's minor unit determines how many decimal places the final amount uses.

Why do JPY, USD and KWD use different decimals?

Their ISO 4217 minor units differ. JPY uses 0 decimals, USD uses 2 and KWD uses 3. Choose the decimal count from the currency you convert into, even when every conversion starts with EUR.

Can I round after every conversion in a chain?

Rounding each leg separately causes drift. Keep intermediate amounts at full precision and round only the amount you show or pay. Use that final destination currency's minor unit for the rounding step.

Does a rounded amount equal a transfer payout?

Banks, cards and transfer services apply their own spread and fees. These calculations use indicative mid-market rates, which are not for settlement or trading. Currency rounding does not account for a service's spread or fees.

Keep reading

Get a free API key

Free has 5,000 requests a month and 10 requests a minute. No credit card is required.

Get a free key