Kembali ke Blog

Cross Exchange Rates Explained: How to Calculate and Use Cross Rates

V
Vlado Grigirov
May 09, 2026
Exchange Rates Currency API Forex Education Developer Guide Finexly

If your application needs to convert Brazilian reals to Indian rupees, Norwegian krone to Singapore dollars, or any pair where the US dollar is not on either side, you are about to do cross exchange rate math. Most currency APIs and forex venues quote thousands of currency pairs against the dollar, but only a handful of pairs trade directly between two non-USD currencies. Everything else — and that is the long tail — is computed as a cross rate.

This guide explains what a cross exchange rate is, the formula in its three forms, worked examples you can verify with a calculator, and production-quality code in JavaScript, Python, PHP, and cURL. We will also cover the pitfalls that cause off-by-one-percent errors in real systems: rounding, bid-ask spreads, stale rates, and inversion mistakes.

What Is a Cross Exchange Rate?

A cross exchange rate is the price of one currency expressed in another currency when neither of them is the local or reference currency in the original quotes. In practice, it almost always means a currency pair that does not include the US dollar, derived from two pairs that each include the dollar.

For example, the EUR/JPY rate is technically a cross rate. Although EUR/JPY is one of the most actively traded pairs in the world and has its own quoted market, the underlying logic is still: take EUR/USD, take USD/JPY, multiply, and you get the same number a Tokyo bank would quote you. The market quote and the calculated cross are pinned to each other by arbitrage — if they ever drifted apart, traders would step in until they matched again.

Currencies that have no liquid direct market — say, Nigerian naira versus Philippine peso (NGN/PHP) — exist only as cross rates. There is no NGN/PHP market in any meaningful sense. Anyone quoting that pair is calculating it from NGN/USD and USD/PHP.

The technical definition makes the distinction clearer:

  • A direct rate is one that is actively quoted on a market or aggregated feed.
  • A cross rate is one that is calculated from two or more direct rates that share a common base currency (usually USD).

Most API providers, including Finexly, serve cross rates seamlessly: you ask for any pair you want, and the engine handles the math behind the scenes. Knowing how that math works still matters because it affects how you handle precision, spreads, and edge cases.

Why Cross Rates Matter for Developers

Cross rates show up in three categories of applications:

Cross-border payments and remittances. A Filipino freelancer invoicing a Brazilian client wants to know how many BRL their PHP-denominated rate is worth. There is no direct BRL/PHP market — the platform calculates it through USD.

Multi-currency e-commerce. A Norwegian merchant displaying prices to a Singaporean customer needs NOK/SGD. Stripe, Adyen, and most payment processors compute that cross internally, then add their FX margin on top.

Financial analytics and trading. Quant systems hedge exposure across portfolios denominated in many currencies. To know your net exposure in EUR, you need to convert positions in MXN, INR, ZAR, and BRL into EUR — all cross calculations.

In each case, the quality of your cross rate depends entirely on the quality and freshness of the two underlying USD pairs. A 2-second-old EUR/USD combined with a 60-second-old USD/JPY produces a cross that is wrong by whatever the JPY moved during that gap. For a primer on how rates are sourced and updated, see our guide on how exchange rates work.

The Cross Rate Formula

There are three cases, depending on how the two source pairs are quoted. The general principle is simple: when you write the rates as fractions, the common currency must cancel.

Case 1: USD is the quote currency in both pairs

Suppose you have:

  • EUR/USD = 1.0850 (1 EUR buys 1.0850 USD)
  • GBP/USD = 1.2620 (1 GBP buys 1.2620 USD)

You want EUR/GBP. The formula is:

EUR/GBP = (EUR/USD) / (GBP/USD)
EUR/GBP = 1.0850 / 1.2620 = 0.8598

So 1 euro buys 0.8598 pounds. Both source quotes have USD on the right side, so we divide.

Case 2: USD is the base currency in both pairs

Suppose you have:

  • USD/JPY = 152.30
  • USD/CHF = 0.8920

You want JPY/CHF. The formula is:

JPY/CHF = (USD/CHF) / (USD/JPY)
JPY/CHF = 0.8920 / 152.30 = 0.005857

So 1 yen buys 0.005857 Swiss francs. Both source quotes have USD on the left side, so we divide, but with the inverted ratio.

Case 3: USD is the base in one and the quote in the other (mixed)

This is the most common case and the one where mistakes happen. Suppose you have:

  • EUR/USD = 1.0850 (USD is the quote)
  • USD/JPY = 152.30 (USD is the base)

You want EUR/JPY. The formula is:

EUR/JPY = (EUR/USD) × (USD/JPY)
EUR/JPY = 1.0850 × 152.30 = 165.25

So 1 euro buys 165.25 yen. The dollars cancel out cleanly: euros-per-dollar times dollars-per-yen leaves euros-per-yen. Multiply in the mixed case.

The simple rule of thumb: write the pairs as fractions, line them up so the USD cancels, and multiply or divide accordingly. Whichever currency is left as the numerator becomes the base of your cross rate.

Worked Examples You Can Verify

Use any major currency feed to verify these numbers. The exact values will drift with the market; the structure is what matters.

Example 1: EUR/JPY (mixed case)

Given EUR/USD = 1.0850 and USD/JPY = 152.30:

EUR/JPY = 1.0850 × 152.30 = 165.2455

Example 2: GBP/CHF (mixed case)

Given GBP/USD = 1.2620 and USD/CHF = 0.8920:

GBP/CHF = 1.2620 × 0.8920 = 1.1257

Example 3: AUD/NZD (both quoted against USD)

Given AUD/USD = 0.6630 and NZD/USD = 0.6010:

AUD/NZD = 0.6630 / 0.6010 = 1.1031

So 1 Australian dollar buys 1.1031 New Zealand dollars.

Example 4: BRL/INR (both quoted with USD as base)

Given USD/BRL = 5.0850 and USD/INR = 84.20:

BRL/INR = (USD/INR) / (USD/BRL) = 84.20 / 5.0850 = 16.561

So 1 Brazilian real buys 16.561 Indian rupees.

For a refresher on the standardized three-letter codes used here, see our ISO 4217 currency codes guide.

Reciprocal Rates and Inverting Pairs

Sometimes your data feed gives you USD/EUR but you need EUR/USD. The reciprocal is:

EUR/USD = 1 / (USD/EUR)

If USD/EUR = 0.9217, then EUR/USD = 1 / 0.9217 = 1.0850.

Two practical points about reciprocals:

First, rounding compounds. If you round a rate to 4 decimal places, then take its reciprocal, then round again, you can introduce errors of 0.01% or more. For high-precision applications, hold the reciprocal at full floating-point precision until the final display step. We cover precision strategies in detail in our post on currency API caching and error handling best practices.

Second, bid and ask invert across reciprocation. If GBP/USD has a bid of 1.2618 and ask of 1.2622, then USD/GBP has a bid of 1/1.2622 = 0.7923 and an ask of 1/1.2618 = 0.7925. The bid of one pair is the reciprocal of the ask of the other, not the bid.

Bid-Ask Spread on Cross Rates

When you build a cross rate from two underlying pairs, the spreads stack.

Suppose:

  • EUR/USD has a bid of 1.0848 and ask of 1.0852 (4-pip spread)
  • USD/JPY has a bid of 152.27 and ask of 152.33 (6-pip spread)

The implied EUR/JPY cross has:

Bid = 1.0848 × 152.27 = 165.183
Ask = 1.0852 × 152.33 = 165.309

That is a 12.6-pip spread on the cross — wider than either source pair. In practice, the directly quoted EUR/JPY market has a tighter spread than this calculated one because liquid cross pairs have their own market makers.

The takeaway for developers is that mid-market cross rates calculated from two USD pairs are estimates of the true direct market. Good enough for displaying prices in a checkout, fine for analytics, but not what your bank or broker will actually fill you at. The mid-market versus dealer rate distinction is covered in our mid-market exchange rate guide.

How to Calculate Cross Rates with the Finexly API

You usually do not need to calculate cross rates by hand. Finexly's API accepts any base and any list of target currencies and serves the cross internally with consistent precision. Here is how to use it across four common stacks.

cURL

curl "https://api.finexly.com/v1/latest?base=BRL&symbols=INR,PHP,NGN" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "base": "BRL",
  "date": "2026-05-09",
  "rates": {
    "INR": 16.561,
    "PHP": 11.272,
    "NGN": 312.45
  }
}

JavaScript (Node 20+, Fetch)

async function getCrossRates(base, targets) {
  const url = `https://api.finexly.com/v1/latest?base=${base}&symbols=${targets.join(",")}`;
  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.FINEXLY_API_KEY}` }
  });
  if (!res.ok) throw new Error(`Finexly API error: ${res.status}`);
  return res.json();
}

const data = await getCrossRates("BRL", ["INR", "PHP", "NGN"]);
console.log(`1 BRL = ${data.rates.INR} INR`);

Python

import os
import requests

def get_cross_rates(base, targets):
    url = "https://api.finexly.com/v1/latest"
    params = {"base": base, "symbols": ",".join(targets)}
    headers = {"Authorization": f"Bearer {os.environ['FINEXLY_API_KEY']}"}
    response = requests.get(url, params=params, headers=headers, timeout=10)
    response.raise_for_status()
    return response.json()

data = get_cross_rates("BRL", ["INR", "PHP", "NGN"])
print(f"1 BRL = {data['rates']['INR']} INR")

PHP

<?php
function getCrossRates(string $base, array $targets): array {
    $symbols = implode(',', $targets);
    $url = "https://api.finexly.com/v1/latest?base={$base}&symbols={$symbols}";
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('FINEXLY_API_KEY')],
        CURLOPT_TIMEOUT => 10,
    ]);
    $body = curl_exec($ch);
    if (curl_errno($ch)) throw new RuntimeException(curl_error($ch));
    curl_close($ch);
    return json_decode($body, true);
}

$data = getCrossRates('BRL', ['INR', 'PHP', 'NGN']);
echo "1 BRL = {$data['rates']['INR']} INR\n";

In all four examples, the API does the cross rate math for you and returns precise mid-market values. You can change the base to any of the 170+ supported currencies and request any number of targets in a single call. For more language-specific patterns, see our currency API Python tutorial, Node.js integration guide, and PHP guide.

When You Should Calculate Cross Rates Yourself

Even with a good API, there are three scenarios where you compute cross rates on your own data rather than fetching them:

Backtesting historical strategies. If you have years of EUR/USD and USD/JPY tick data on your own servers, computing EUR/JPY locally avoids hitting an external API millions of times. Use historical exchange rate endpoints to seed the data, then derive crosses in your backtest engine.

Latency-sensitive applications. Algorithmic trading systems often pre-compute crosses from underlying USD pairs in memory because shaving a network round-trip matters. The trade-off is that you assume responsibility for synchronization and freshness.

Custom blended rates. Some platforms quote internal rates that mix multiple sources or apply a markup. Doing the cross math in-house lets you apply your business logic before exposing the rate to customers.

If your use case is none of the above — a checkout page, an invoicing tool, an internal dashboard — let the API serve the cross directly. It will be more accurate, easier to maintain, and faster to implement.

Common Pitfalls When Calculating Cross Rates

These are the mistakes we see most often when reviewing developer code.

Inverting the wrong pair. When the two source pairs are quoted in opposite directions (one with USD as base, one with USD as quote), it is easy to multiply when you should have inverted-and-divided. Always write the rates as fractions and confirm the common currency cancels.

Rounding too early. A common bug: round each source rate to four decimals, then multiply. The compounded rounding can produce errors of 0.01% to 0.1%. For financial calculations, hold full precision and round only at display time.

Using stale rates. If your two source rates were fetched 30 seconds apart, the cross built from them is internally inconsistent. Fetch both in a single API call (which is what ?symbols=A,B,C does in the Finexly API) so they are timestamped together.

Mixing weekday and weekend data. Forex markets close on weekends. If your scheduled job pulled EUR/USD on Friday at 5:01 PM EST and USD/JPY on Friday at 4:59 PM EST, you might be mixing live and stale data. Standardize all rate fetches against a single market timestamp. We dig into this in our forex market hours guide.

Ignoring the spread for transactional use. Cross rates calculated from mid-market sources are good for display, but if real money is moving, you need the bid or the ask depending on the direction of the trade. Build spread modeling explicitly into your code rather than relying on the mid.

Frequently Asked Questions

What is a cross exchange rate in simple terms?

It is the exchange rate between two currencies, calculated using each one's exchange rate against a third common currency, typically the US dollar. For example, the EUR/JPY rate is derived from EUR/USD and USD/JPY.

Are EUR/JPY and GBP/JPY considered cross rates?

Yes, technically. They do not include the US dollar, so by the strict definition they are crosses. However, both pairs are so heavily traded directly that they have their own quoted markets and behave like primary pairs in practice.

Why are cross rates important?

Cross rates make it possible to price and trade currencies that have no liquid direct market between them — most pairs in the world. They are essential for cross-border payments, multi-currency commerce, and global financial analytics.

Can I calculate a cross rate without using the US dollar as the bridge?

Yes. Any common currency works as the bridge. EUR is sometimes used in Europe-centric calculations, and JPY is used in some Asian markets. USD is the default because more pairs are quoted against it, giving better data quality.

How accurate are calculated cross rates compared to direct market quotes?

For liquid crosses like EUR/JPY or GBP/CHF, calculated and direct rates are nearly identical because of arbitrage. For illiquid crosses like NGN/PHP, the calculated rate is the only available reference point — there is no separate direct market to compare against.

Does Finexly calculate cross rates automatically?

Yes. You request any base and any list of target currencies, and the API serves consistent, mid-market cross rates. You do not need to calculate or invert anything yourself.

Get Started With Finexly

Ready to use real-time cross rates in your application? Get your free Finexly API key — no credit card required. You get 1,000 requests per month on the free plan, and you can scale up through our pricing plans as your traffic grows. The API supports 170+ currencies and computes cross rates for any pair seamlessly, so you can focus on your product instead of FX math.

Vlado Grigirov

Senior Currency Markets Analyst & Financial Strategist

Vlado Grigirov is a senior currency markets analyst and financial strategist with over 14 years of experience in foreign exchange markets, cross-border finance, and currency risk management. He has wo...

View full profile →