---
title: "Calculate realised foreign exchange gains and losses"
description: "Calculate a receivable or payable's realised foreign exchange gain or loss using one official table for booking and settlement, then keep evidence."
canonical: "https://exchangerate.dev/official/guides/realised-fx-gains-and-losses"
---

> Index of every exchangerate.dev page and doc for AI readers: [llms.txt](https://exchangerate.dev/llms.txt)

# Calculate realised foreign exchange gains and losses

Compare booking and settlement values using the same official table for both dates.

By the Exchangerate team · Updated 15 Oct 2026 · 1 min read

A realised foreign exchange gain or loss is the difference between the home-currency value at booking and at settlement. The gain-loss endpoint values both dates using the same official table for a receivable or payable.

- A realised gain or loss compares the value at booking with the value at settlement.
- Use the same official table to value both dates.
- Keep the lookup ID to retrieve the answer's publication evidence.

## Compare booking and settlement values

A foreign-currency receivable or payable has a home-currency value when booked and a home-currency value when settled.

The difference is a realised foreign exchange gain or loss. Identify whether the amount is a receivable or payable when requesting the calculation.

## Calculate at the official rate

`POST /v1/official/{country}/{type}/gain-loss` calculates the realised gain or loss in the home currency. It requires Pro.

Supply currency, amount, booked_on, settled_on and kind. Set kind to receivable or payable.

The endpoint values both dates at the selected table's official rate.

## Use the same table for both dates

The country and type in the endpoint select one table for the calculation. That table supplies the rate valid on the booking date and the rate valid on the settlement date.

Using the same table keeps the comparison tied to one authority's table across both dates. Mixing tables would also change the basis of the comparison.

## Keep evidence for the calculation

On Pro, each answer carries an X-Lookup-Id header. Keep that identifier with the calculation.

`GET /v1/official/evidence/{lookup_id}` returns what was answered, when and from which publication.

For the underlying rates, a date lookup with expand=source provides the exact printed value and units, publication number, publication date, source document URL and retrieval time. Corrections create new versions, and superseded versions are kept.

## Questions

### Which dates does the calculation use?

It uses booked_on and settled_on. Both dates are valued at the selected table's official rate.

### Does the endpoint support both receivables and payables?

Yes. Set kind to receivable or payable. The endpoint returns the realised gain or loss in the home currency.

### How do I retrieve evidence for an answer?

Keep the X-Lookup-Id response header, then request GET /v1/official/evidence/{lookup_id}. Evidence and gain-loss both require Pro.

## Keep reading

- [Official exchange rates by country](https://exchangerate.dev/official)
- [Official exchange rates API reference](https://exchangerate.dev/docs/official)
- [RBA exchange rates: daily table and history](https://exchangerate.dev/official/australia)
- [PTAX: closing selling rate and daily history](https://exchangerate.dev/official/brazil)
- [Bank of Canada exchange rate: daily table and history](https://exchangerate.dev/official/canada)

Source: https://exchangerate.dev/official/guides/realised-fx-gains-and-losses
