FX conversion & gain/loss
The rate is the one in your policy, so you type it. No live rate, no network call, no stale surprise.
- Runs
- In this tab
- Data sent
- None
- Rounding
- Once, at the end
- Also in
- The Chrome extension
FX conversion & gain/loss, worked
Showing a worked example — type over it
Result
How the FX conversion & gain/loss works.
FX conversion with a rate you type between two named currencies, each at its own scale, plus realised / unrealised FX gain-loss (signed by whether the item is a receivable or a payable)
Quoted from the toolbelt spec, the document this tool was built against.
Where these numbers come from.
Negatives are parenthesised because that is what a statement does. The rest is four promises.
Minor units, never floats
Amounts are integers in the currency's smallest unit, end to end. A float never touches a cent.
Rounded once
Rounded once, at the end — never per operand, which is how a split stops summing to the whole.
Unit tested
The arithmetic lives in one unit-tested module, shared without reimplementation with the extension.
No network
There is no request to make. What you type stays in this tab and is gone when you close it.
More in money maths
- VAT / sales taxGross to net is a division, not a multiplication. The three figures always add back up.
- Margin & markupThey are not the same number, and confusing them is how a price list quietly loses money.
- Penny-exact allocationSplit 100.00 three ways and get 33.34 / 33.33 / 33.33 — never a cent left in suspense.
- NPV, IRR & XIRRIRR by bisection, so a sign-change-heavy series does not converge on a confident wrong answer.
- Effective vs nominal rate12% compounded monthly is 12.68%. That difference is the covenant you either pass or fail.
The same number, elsewhere.
A calculator answers the question once. These carry the answer into a product, name what it computed, and argue the method.
- ComponentConversionBreakdownAmount → fee → rate → recipient gets. Every line.
- ComponentFxGainLossPanelRealized and unrealized never combined.
- ComponentFxRevaluationMonetary items only, derived from classification.
- ComponentRateTableRate type is not optional. A missing rate blocks.
- TermFunctional currencyThe currency of the primary economic environment in which the entity generates and spends cash — a judgment from cash-flow, sales-price, expense and financing indicators
- TermPresentation currencyThe currency the statements are shown in. ASC 830 calls it the reporting currency; IAS 21 the presentation currency — we use the latter
- TermRemeasurementRestating foreign-currency monetary balances, or books kept in a currency other than the functional one, into the functional currency — differences go to the P&L
- TermTranslationConverting an entity's functional-currency statements into the presentation currency — assets and liabilities at the closing rate, income and expense at average — with the difference recorded in OCI as the CTA
- TermCTACumulative translation adjustment — the running total of translation differences, held in AOCI until the foreign entity is sold or substantially liquidated
- DocMulti-entity & FXConsolidation and currency are where finance UIs quietly produce wrong numbers, because both involve summing things that look summable and aren't.
- EntryJournal entry for a realized foreign exchange gain or lossBook a foreign-currency invoice at the rate on the invoice date. When it is collected at a different rate, debit Cash for the dollars received, credit Accounts receivable for the dollars originally booked, and book the difference as a realized foreign exchange gain or loss.
- EntryJournal entry for an unrealized FX revaluationAt each month-end, remeasure open foreign-currency receivables and payables at the closing rate: debit the receivable and credit Foreign exchange gain when the dollar value has risen, or the reverse for a loss. The gain is unrealized until the item settles.
- DocCurrency decimal placesHow many decimals each ISO 4217 code is stored at — JPY 0, USD 2, KWD 3.