# FX gains & losses

> Realized vs. unrealized foreign-exchange gains and losses — what they are, why accountants calculate them, worked examples, and where each shows up in AccountFUN.

Source: https://www.accountfun.com/docs/concepts/fx-gains-and-losses/

When your business trades across currencies, the exchange rate between the transaction date and the day money actually moves is rarely the same. That movement creates **foreign-exchange (FX) gains and losses** — and getting them right is one of the most important (and most misunderstood) parts of multi-currency bookkeeping.

This guide explains the two flavors — **realized** and **unrealized** — why both exist, how each is calculated, and exactly where you’ll see them in AccountFUN. For setting up foreign-currency accounts and rates, see the companion [Multi-currency guide](https://www.accountfun.com/docs/guides/multi-currency/).

## The problem FX gains and losses solve

Suppose your base currency is **USD**, and you invoice a European customer **€1,000**. At the time, €1,000 is worth **$1,080**. You record the invoice at that rate. A month later the customer pays, but the euro has weakened — now €1,000 is only worth **$1,070**. You receive $10 less than you originally booked as revenue.

That **$10** is a real effect. It isn’t revenue, and it isn’t an expense in the ordinary sense — it’s an **exchange difference**, caused purely by currency movement between the day you recognized the sale and the day you settled it in cash. Accounting standards require you to capture it cleanly, in its own place, so your profit isn’t distorted and your reports stay honest.

There are two moments this matters, and each gets its own treatment:

|             | **Realized FX**                               | **Unrealized FX**                                               |
| ----------- | --------------------------------------------- | --------------------------------------------------------------- |
| When        | A foreign transaction is **settled in cash**  | An open balance is **revalued at period-end** (still unsettled) |
| Is it real? | Yes — cash actually moved at a different rate | No — it’s a *paper* gain/loss “as of” a snapshot date           |
| Effect      | Permanently booked to the P\&L                | Shown on a report (and posted at period-end if you revalue)     |

Let’s take them one at a time.

## Realized FX gains & losses

A gain or loss is **realized** the moment a foreign-currency item is *settled* — paid or received in cash — at a different exchange rate than the one it was originally recorded at. Up until settlement, the difference is just a paper movement; the instant cash moves, it becomes real and is booked permanently.

### Why it’s calculated

Two reasons:

1. **The matching principle.** Revenue and the related receivable were recorded at the *original* rate. Cash arrives at the *settlement* rate. The gap belongs in the same period as the settlement, not silently buried in revenue.
2. **Clean reporting.** Isolating FX in its own account keeps your *operating* profit meaningful — you can see how the business actually performed, separate from currency luck.

### How it works

Every journal-entry line in AccountFUN stores the **source currency** and the **exchange rate** applied at posting. When a foreign invoice/bill is settled, the payment posts the bank leg at the *payment-day* rate while the receivable/payable leg clears at the *original* rate. The small residual between those two rates is the realized gain or loss — and AccountFUN posts it automatically to a dedicated system account.

* **Realized FX Gain** → the settlement rate was *favorable* (you received more base currency than expected, or paid less). Increases the FX account.
* **Realized FX Loss** → the settlement rate was *unfavorable*. Decreases it.

One netting account

Gains and losses both post to a single system account — **850 Realized FX Gain/Loss** — so the balance is the *net* FX result for the period. The sign tells you which way it cut: a positive (credit) balance is a net gain; a negative (debit) balance is a net loss.

### Worked example: a customer invoice

Base currency USD. On **Mar 1** you invoice Acme Co **€1,000**. Rate that day: **1 EUR = 1.08 USD**. The invoice records €1,000 of revenue worth **$1,080**, and €1,000 of receivable worth $1,080.

```text
Mar 1  (rate 1.08)   Dr Accounts Receivable    $1,080
                     Cr Sales Revenue                  $1,080
```

On **Apr 10** Acme pays, but the euro has weakened to **1 EUR = 1.07 USD**. You receive €1,000 = **$1,070** in cash. AccountFUN clears the receivable at its *original* $1,080 and banks the *actual* $1,070 — the **$10 gap** is a realized loss:

```text
Apr 10 (rate 1.07)   Dr Bank                    $1,070
                     Dr Realized FX Loss (850)     $10
                     Cr Accounts Receivable          $1,080
```

Debits ($1,070 + $10) = Credits ($1,080). Balanced. The $10 is now permanently on your P\&L as an FX loss — exactly where it belongs.

Direction intuition

For money **coming in**: if the rate *fell* between invoicing and payment, you got less base currency → **loss**. If it *rose*, you got more → **gain**. For money **going out** (paying a foreign bill), it’s the mirror: a lower rate means you paid less base currency → **gain**.

### Where realized FX shows up

* **The transaction detail page** (`/transactions/{id}`) — a dedicated **“Realized FX Gain/Loss”** card appears on any cross-currency transaction, showing the amount (+gain in green / −loss in red), the FX account, and the currency.
* **Profit & Loss report** — the net realized FX sits in **Other Income** under account **850 Realized FX Gain/Loss**.
* **Transactions Report** and **GL Transaction Report** — filter to account 850 to see every realized FX line and trace each back to the settlement that caused it.

### It’s automatic — and the rate is always yours to confirm

You never compute realized FX by hand. It’s posted automatically by every flow that settles a foreign-currency transaction: invoice/bill [payments](https://www.accountfun.com/docs/guides/payments/), [batch deposits/payments](https://www.accountfun.com/docs/guides/payments/), [reconciliation](https://www.accountfun.com/docs/guides/bank-reconciliation/) Create/Transfer/Find & Match, [Spend/Receive Money](https://www.accountfun.com/docs/guides/bank-reconciliation/), and bank-rule Apply. Crucially, **you are always prompted to confirm the exchange rate** — AccountFUN never silently fetches one — so the realized FX reflects what your bank actually charged, not a guessed market rate.

### ”FX Clearance” entries on a drained foreign bank account

If you look at your **Transactions** report you may spot an entry labeled **“FX Clearance”** (journal type *FX Clearance*) that you didn’t create. This is an automatic realized-FX adjustment, and it only concerns **foreign-currency bank accounts** — it never appears on home-currency accounts or on AR/AP.

Here’s why it exists. A foreign bank account keeps two balances at once: its **native** balance (the actual euros/dollars in the bank) and its **base** balance (the home-currency value on your books). When you deposit and withdraw the *same* foreign amount on different days, the native balance returns to zero but the two conversions used different rates, so a small base-currency residual is left behind:

```text
Deposit:  $100 USD @ 7.81 → Dr 781 HKD
Withdraw: $100 USD @ 7.79 → Cr 779 HKD
Native balance:  ≈ $0.00 USD   (drained)
Base balance:    2 HKD         (a residual from the 0.02 rate drift)
```

The account is empty in real life, yet your books still show HKD 2 sitting there. AccountFUN detects this the instant a foreign bank account is **drained** (native balance within **0.005** of zero) while a non-trivial base residual remains, and posts a tiny **FX Clearance** entry to zero out *both* balances — booking the residual as a realized gain or loss to account **850**. The journal description reads *“Realized FX — foreign-currency account cleared.”*

You don’t do anything

FX Clearance is entirely automatic and fires inside the same transaction as the payment/transfer/reconciliation that drained the account — there is no button to press and no rate to confirm (the residual is a fixed historical fact, not a new conversion). It only runs on **fully drained** accounts; partial balances keep their unrealized FX, which the live [revaluation](https://www.accountfun.com/docs/guides/fx-revaluation/) handles on your reports. You’ll see it most often on accounts you use as temporary pass-throughs (receive in foreign currency, then sweep it out).

## Unrealized FX gains & losses

A gain or loss is **unrealized** while the foreign-currency balance is still *open* — the invoice isn’t paid yet, or a foreign bank/loan balance is still sitting there. At a snapshot date (typically period-end), you revalue those open balances to today’s closing rate and record the *paper* movement. It answers: *“if I closed the books today, how much FX gain or loss is hiding in my open balances?”*

### Why it’s calculated

This comes from accounting standard **IAS 21** (The Effects of Changes in Foreign Exchange Rates), which says **monetary** items — cash, receivables, payables, loans — must be retranslated at the **closing exchange rate** at each reporting date, because their base-currency value genuinely drifts as rates move. Non-monetary items (inventory, fixed assets, equity) stay at their historical rate. (See [Multi-currency](https://www.accountfun.com/docs/guides/multi-currency/) for the monetary/non-monetary distinction.)

The point is a fair balance sheet: an unpaid €1,000 invoice recorded at $1,080 is *really* worth whatever €1,000 is worth today, and your reports should say so.

### How it works — two categories

AccountFUN’s **Unrealized FX report** (`Reports → Unrealized FX`) calculates both, as of a date you choose:

1. **Outstanding foreign invoices and bills** — for each unpaid foreign-currency document, it compares the **original posting rate** against the **current (closing) rate** on the still-outstanding amount.

   ```text
   unrealized gain/loss = outstandingForeign × (currentRate − originalRate)
   ```

   *(applied in the right direction for assets vs liabilities)*

2. **Monetary foreign-currency accounts** — for foreign banks, loans, and cash marked *monetary*, it reconstructs the foreign balance from the posted lines, then revalues it at the closing rate.

   ```text
   unrealized gain/loss = (foreignBalance × closingRate) − currentBaseBalance
   ```

Positive = gain, negative = loss, and the report footers total each category.

### Worked example: the same invoice, before it’s paid

Return to the Acme invoice above, but now it’s **Mar 31** and Acme *hasn’t paid yet*. Your base currency is USD; the invoice is still €1,000 outstanding, recorded at the original $1,080. By Mar 31 the rate has dropped to **1 EUR = 1.07 USD**, so €1,000 is now worth only **$1,070**.

Run the **Unrealized FX report** as of Mar 31. It shows:

```text
Acme Co · Invoice · EUR
  Outstanding:       €1,000
  Original rate:     1.08   → $1,080 (booked)
  Current rate:      1.07   → $1,070 (revalued)
  Unrealized loss:           −$10
```

That **−$10** is *paper*: no cash has moved. It tells you the receivable is now worth $10 less than you booked. If Acme paid at exactly that rate tomorrow, that $10 would convert into a **realized** loss.

Realized grows out of unrealized

The two are the same phenomenon at different moments. The unrealized figure is a forecast of the realized figure *if rates held steady*. When the item settles, the accumulated unrealized amount effectively “crystallizes” into a realized gain/loss at the actual settlement rate.

### Where unrealized FX shows up

Unrealized FX splits across **two reports**, because the exposure on an outstanding invoice is different from the exposure on a bank balance you’re holding:

* **Realized / Unrealized FX (AR/AP) report** (`/reports/fx-gains-losses`) — realized FX from settlements, plus the unrealized FX on your outstanding invoices and bills.
* **Bank Revaluation report** (`/reports/bank-revaluation`) — the unrealized FX on bank, cash, and loan accounts you hold in a foreign currency.
* **Balance Sheet & Profit & Loss** — your foreign-currency bank, loan, receivable, and payable balances always show at today’s rate, with the unrealized gain or loss visible under Other Income.
* Both reports support **historical queries** — you can see your FX exposure *as of* any past date, which is useful at year-end.

Realized vs. unrealized: how each is shown

Realized FX is **recorded automatically** the moment a settlement happens — it’s a permanent figure on your P\&L. Unrealized FX is **calculated live** on your reports at today’s (or the period-end) rate, so it updates as rates move:

* The **Realized / Unrealized FX (AR/AP)** and **Bank Revaluation** reports show your open FX exposure on demand, at any date.
* The **Balance Sheet, P\&L, and Trial Balance** revalue your foreign-currency balances automatically on every view.

See [Period-end FX revaluation](https://www.accountfun.com/docs/guides/fx-revaluation/) for the full picture.

## The three FX accounts, side by side

AccountFUN tracks foreign-exchange movements in three accounts, each capturing a different kind of FX so you can see clearly where your exposure sits:

|                    | **850 Realized FX Gain/Loss**                                         | **860 Unrealized FX Gain/Loss**                                     | **870 Bank Revaluation Gain/Loss**                                                          |
| ------------------ | --------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| What it captures   | The actual gain/loss once a foreign-currency transaction is *settled* | Today’s paper gain/loss on **unpaid invoices and bills**            | Today’s paper gain/loss on **bank, cash, and loan balances** you hold in a foreign currency |
| When it moves      | When you pay or receive the foreign currency                          | As the exchange rate moves while an invoice or bill is still unpaid | As the exchange rate moves while you hold the balance                                       |
| Real cash?         | Yes — already banked                                                  | No — it’s a forecast, until the invoice/bill is paid                | No — it’s a forecast, until the balance is converted or settled                             |
| Where to review it | Realized / Unrealized FX (AR/AP) report                               | Realized / Unrealized FX (AR/AP) report                             | Bank Revaluation report                                                                     |
| Account type       | Other Income                                                          | Other Income                                                        | Other Income                                                                                |

All three are managed by AccountFUN (you can rename the display name but not the type), and each shows gains net of losses in a single balance.

Why split them? The FX on money a customer owes you behaves differently from the FX on cash sitting in your bank — one clears up when the invoice is paid, the other moves every day you hold the balance. Keeping them separate shows you exactly where your foreign-currency risk is concentrated.

## A full lifecycle: raise, revalue, settle

Putting it all together — one foreign invoice, tracked through both FX moments:

1. **Mar 1 — Invoice raised.** €1,000 at 1.08 → revenue and receivable both **$1,080**. No FX gain/loss yet.
2. **Mar 31 — Period-end.** Rate now 1.07. The **Unrealized FX report** shows a **−$10 paper loss** on the still-open invoice, and account 860 reflects it live on the Balance Sheet and P\&L — the receivable is effectively marked to $1,070.
3. **Apr 10 — Customer pays.** Actual rate 1.06 → you bank **$1,060**. AccountFUN clears the $1,080 receivable and posts a **$20 realized loss** to account 850. The unrealized estimate was $10; the final realized outcome is $20 because the rate kept moving.

At every step the books balance, the FX is isolated in its own accounts, and you can trace each number back to the entry and the rate that produced it.

## Practical tips

* **Always confirm the rate.** Because realized FX is *locked in* at whatever rate you confirm, double-check it against your bank’s actual conversion. A wrong rate produces a wrong (but permanent) gain/loss. AccountFUN prompts you every time and flags any rate more than 5% off market.
* **Review the Unrealized FX report before period-end.** It shows your open exposure so there are no surprises — useful for deciding when to convert cash or hedge.
* **Don’t panic over unrealized swings.** They’re paper. A big unrealized loss this month can reverse next month if rates move back. Realized is what’s permanent.
* **Isolate, don’t mix.** Resist the temptation to code FX differences into revenue or expense accounts. Keeping them in 850/860 means your operating P\&L stays clean and your accountant (and future you) can see the currency effect on its own line.
* **Foreign bank accounts revalue too.** A EUR bank account on a USD books isn’t just “money” — its base-currency value drifts daily. That’s why foreign banks must be marked **monetary** and appear in the Unrealized FX report.

## Where to next

* **[Multi-currency](https://www.accountfun.com/docs/guides/multi-currency/)** — set up foreign-currency accounts, exchange rates, and the monetary/non-monetary classification.
* **[Bank reconciliation](https://www.accountfun.com/docs/guides/bank-reconciliation/)** — the cross-currency reconciliation flows that produce most realized FX.
* **[Reports](https://www.accountfun.com/docs/guides/reports/)** — the Unrealized FX, P\&L, and Balance Sheet reports where FX surfaces.
* **[Double-entry & journal entries](https://www.accountfun.com/docs/concepts/double-entry/)** — the foundation these FX entries are built on.
