Currency Exchange Rate Calculator Formula

Understand the math behind the currency exchange rate calculator. Each variable explained with a worked example.

Formulas Used

Converted Amount

converted = amount * rate

Inverse Rate

inverse_rate = rate > 0 ? 1 / rate : 0

Reverse Conversion

inverse_amount = rate > 0 ? amount / rate : 0

Variables

VariableDescriptionDefault
amountAmount100
rateExchange Rate1.25

How It Works

How to Calculate Currency Exchange

Formula

Converted Amount = Amount × Exchange Rate

The exchange rate tells you how much of the target currency you get for 1 unit of the source currency. For example, if the USD/EUR rate is 0.92, then $100 USD = 100 × 0.92 = 92 EUR.

Inverse Rate

To convert the other way, use the reciprocal: Inverse Rate = 1 / Rate

Worked Example

Convert 100 units at an exchange rate of 1.25.

amount = 100rate = 1.25
  1. 01Converted = 100 × 1.25 = 125.00
  2. 02Inverse rate = 1 / 1.25 = 0.80
  3. 03Reverse conversion = 100 / 1.25 = 80.00