BMO Currency Exchange Calculator
Use this calculator to quickly convert currencies based on current exchange rates provided by BMO. Please note that these rates are indicative and actual transaction rates may vary.
Amount to Convert:
From Currency:
Canadian Dollar (CAD)
US Dollar (USD)
Euro (EUR)
British Pound (GBP)
Japanese Yen (JPY)
To Currency:
Canadian Dollar (CAD)
US Dollar (USD)
Euro (EUR)
British Pound (GBP)
Japanese Yen (JPY)
Calculate
function calculateExchangeRate() {
var amount = parseFloat(document.getElementById("amount").value);
var fromCurrency = document.getElementById("fromCurrency").value;
var toCurrency = document.getElementById("toCurrency").value;
var exchangeRates = {
CAD: {
USD: 0.73,
EUR: 0.67,
GBP: 0.58,
JPY: 108.50
},
USD: {
CAD: 1.37,
EUR: 0.92,
GBP: 0.79,
JPY: 148.60
},
EUR: {
CAD: 1.49,
USD: 1.08,
GBP: 0.86,
JPY: 161.50
},
GBP: {
CAD: 1.73,
USD: 1.26,
EUR: 1.16,
JPY: 187.70
},
JPY: {
CAD: 0.0092,
USD: 0.0067,
EUR: 0.0062,
GBP: 0.0053
}
};
var resultDiv = document.getElementById("result");
if (isNaN(amount) || amount <= 0) {
resultDiv.innerHTML = "Please enter a valid positive amount.";
return;
}
if (fromCurrency === toCurrency) {
resultDiv.innerHTML = "Converted Amount: " + amount.toFixed(2) + " " + toCurrency + "";
return;
}
var rate = exchangeRates[fromCurrency] ? exchangeRates[fromCurrency][toCurrency] : null;
if (rate !== null) {
var convertedAmount = amount * rate;
resultDiv.innerHTML = "Converted Amount: " + convertedAmount.toFixed(2) + " " + toCurrency + "";
} else {
resultDiv.innerHTML = "Exchange rate not available for this conversion.";
}
}
#currency-exchange-calculator {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 400px;
margin: 20px auto;
background-color: #f9f9f9;
}
#currency-exchange-calculator h2 {
text-align: center;
margin-bottom: 15px;
color: #333;
}
#currency-exchange-calculator p {
text-align: center;
font-size: 0.9em;
color: #555;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #444;
}
.form-group input[type="number"],
.form-group select {
width: calc(100% – 12px); /* Adjust for padding */
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
#currency-exchange-calculator button {
display: block;
width: 100%;
padding: 10px;
background-color: #005A9C; /* BMO Blue */
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
#currency-exchange-calculator button:hover {
background-color: #004A80;
}
#result {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #eee;
text-align: center;
font-size: 1.1em;
font-weight: bold;
color: #005A9C; /* BMO Blue */
}
#result p {
margin: 0;
}