Cross rates explained

Calculate a currency cross rate from two rates with a shared base, check the direction, and avoid mismatched timestamps or rounding inputs too early.

A white narwhal observing three currency tokens connected by a small bridge.

Two rates with one shared base

Suppose one illustrative snapshot says 1 USD = 0.80 EUR and 1 USD = 120 JPY. To calculate how many yen one euro is worth, divide the JPY-per-USD rate by the EUR-per-USD rate. The USD units cancel.

Illustrative EUR-to-JPY cross rate
120 JPY/USD ÷ 0.80 EUR/USD = 150 JPY/EUR
10 EUR × 150 JPY/EUR = 1,500 JPY

Multiply when the units already form a chain

The same inputs can be rearranged. Invert 0.80 EUR per USD to get 1.25 USD per EUR, then multiply by 120 JPY per USD. That also gives 150 JPY per EUR.

The formula follows the units, not a universal “always multiply” shortcut. With a common base, target rate divided by source rate works. With a common quote or a mixture of directions, first write each rate as currency received per currency supplied.

Reverse the result carefully

The reverse of 150 JPY per EUR is 1/150 EUR per JPY, approximately 0.00666667 for display. Keep more working precision than this shortened label when converting an amount.

A useful check is that a positive rate multiplied by its unrounded reciprocal equals one. A division by zero, a missing rate or a non-positive value is a failed input, not a currency result.

Retrieve compatible inputs

Narwhal can return selected currencies for a requested base. The request below retrieves EUR and JPY against USD; it does not promise the illustrative values above. Each returned record has its own timestamp and stale flag.

Request both input currencies
curl --request GET \
  --url "https://api.narwhalapi.com/v1/fx/rates/USD?currencies=EUR,JPY" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"

One response can contain different observation times

Do not assume that two rates arrived from the same market instant simply because they appeared in one HTTP response. A derived rate combining an earlier observation with a newer one has mixed time context.

  • Compare the input timestamps and both stale flags.
  • Choose an acceptable time gap for your use case; there is no universal threshold.
  • Keep both input observations with the derived result.
  • If you summarise freshness with one age, use the older input and still retain the two timestamps.

A calculated cross rate is an indicative result

Compatible mid or reference rates give an indicative cross rate. They do not establish an executable trading price. Bid/ask spreads, different venues and observation timing can make a separately quoted pair differ.

Keep rate types consistent and avoid rounding each leg before division. If you only need an amount conversion, request the target pair directly through the documented conversion operation and retain its returned rate and time context.

Sources and references

Published . Last reviewed .