Currency Converter
A currency converter calculates exchange rates between different currencies for travel, international business, and investment purposes. Exchange rates fluctuate based on economic factors, interest rates, and market conditions.
Major Currency Pairs
| Currency | Symbol | Description |
|---|---|---|
| USD | $ | US Dollar (base currency) |
| EUR | € | Euro (European Union) |
| GBP | £ | British Pound Sterling |
| JPY | ¥ | Japanese Yen |
| CAD | C$ | Canadian Dollar |
| AUD | A$ | Australian Dollar |
| CHF | Fr | Swiss Franc |
Currency Conversion Example
At exchange rates (example values):
| From USD | To EUR (0.92) | To GBP (0.79) | To JPY (149) |
|---|---|---|---|
| $100 | €92 | £79 | ¥14,900 |
| $500 | €460 | £395 | ¥74,500 |
| $1,000 | €920 | £790 | ¥149,000 |
| $5,000 | €4,600 | £3,950 | ¥745,000 |
Currency Converter Implementation
``javascript
function convertCurrency(amount, fromCurrency, toCurrency, rates) {
// Rates are relative to USD
const fromRate = rates[fromCurrency] || 1;
const toRate = rates[toCurrency] || 1;
// Convert to USD first, then to target
const inUSD = amount / fromRate;
const converted = inUSD * toRate;
return {
original: amount,
fromCurrency,
toCurrency,
converted: converted.toFixed(2),
rate: (toRate / fromRate).toFixed(4)
};
}
const rates = { USD: 1, EUR: 0.92, GBP: 0.79, JPY: 149, CAD: 1.36 };
console.log(convertCurrency(100, 'USD', 'EUR', rates));
// { original: 100, converted: '92.00', rate: '0.9200' }
`
Currency Exchange Tips
Bank and credit card rates are typically better than airport exchanges. Many cards offer no foreign transaction fees. Consider multi-currency accounts for frequent international travelers.
The Four Percentage Questions
Almost every percentage problem is one of these, and mixing them up is the most common
arithmetic error there is:
| Question | Formula | Example |
|---|---|---|
| What is X% of Y? | Y × (X ÷ 100) | 15% of 80 = 12 |
| X is what % of Y? | (X ÷ Y) × 100 | 12 is 15% of 80 |
| X is Y% of what? | X ÷ (Y ÷ 100) | 12 is 15% of 80 |
| % change from X to Y | ((Y − X) ÷ X) × 100 | 80 → 92 is +15% |
Percentage Points Are Not Percent
A rate moving from 4% to 5% is one percentage point, and a 25% increase. Both
statements are true and they are not interchangeable — headlines routinely use the smaller
one when reporting a rise and the larger one when reporting a fall.
Increases and Decreases Do Not Cancel
| Start | Change | Result |
|---|---|---|
| 100 | +50%, then −50% | 75 |
| 100 | −50%, then +50% | 75 |
| 100 | −20%, then +25% | 100 |
The reason is that the second percentage applies to a different base. To reverse a −20% you
need +25%, not +20%. This is why a stock that falls 50% must double to break even, and why
"we cut costs 30% then grew 30%" leaves you 9% down.Reversing a Percentage
To find the price before a 20% discount, divide by 0.8 — do not add 20%:
`
before = after ÷ (1 − discount)
$80 ÷ 0.8 = $100 ✓
$80 × 1.2 = $96 ✗
``
The same asymmetry applies to tax, tips, markups and platform fees.