Bbva Exchange Rate Calculator

BBVA Exchange Rate Calculator

Use this calculator to quickly convert currencies using current or historical exchange rates provided by BBVA. Enter the amount you wish to convert and select the currencies to see the estimated equivalent.

EUR (Euro) USD (United States Dollar) GBP (British Pound) JPY (Japanese Yen) CAD (Canadian Dollar) AUD (Australian Dollar) CHF (Swiss Franc) CNY (Chinese Yuan)
USD (United States Dollar) EUR (Euro) GBP (British Pound) JPY (Japanese Yen) CAD (Canadian Dollar) AUD (Australian Dollar) CHF (Swiss Franc) CNY (Chinese Yuan)
// In a real-world scenario, you would fetch live exchange rates from an API. // For demonstration purposes, we'll use a simplified, static set of rates. // These rates are illustrative and not actual BBVA rates. var exchangeRates = { "EUR": { "USD": 1.07, "GBP": 0.86, "JPY": 160.50, "CAD": 1.45, "AUD": 1.63, "CHF": 0.96, "CNY": 7.70 }, "USD": { "EUR": 0.93, "GBP": 0.80, "JPY": 149.99, "CAD": 1.35, "AUD": 1.52, "CHF": 0.89, "CNY": 7.19 }, "GBP": { "EUR": 1.16, "USD": 1.25, "JPY": 187.50, "CAD": 1.69, "AUD": 1.90, "CHF": 1.11, "CNY": 8.99 }, "JPY": { "EUR": 0.0062, "USD": 0.0067, "GBP": 0.0053, "CAD": 0.0090, "AUD": 0.0101, "CHF": 0.0059, "CNY": 0.0448 }, "CAD": { "EUR": 0.69, "USD": 0.74, "GBP": 0.59, "JPY": 111.11, "AUD": 1.13, "CHF": 0.66, "CNY": 5.33 }, "AUD": { "EUR": 0.61, "USD": 0.66, "GBP": 0.53, "JPY": 98.77, "CAD": 0.88, "CHF": 0.58, "CNY": 4.72 }, "CHF": { "EUR": 1.04, "USD": 1.12, "GBP": 0.90, "JPY": 169.89, "CAD": 1.51, "AUD": 1.72, "CNY": 8.00 }, "CNY": { "EUR": 0.13, "USD": 0.14, "GBP": 0.11, "JPY": 22.22, "CAD": 0.19, "AUD": 0.21, "CHF": 0.125 } }; function calculateExchangeRate() { var amount = parseFloat(document.getElementById("amountToConvert").value); var fromCurrency = document.getElementById("fromCurrency").value; var toCurrency = document.getElementById("toCurrency").value; var resultDiv = document.getElementById("result"); resultDiv.innerHTML = ""; // Clear previous results if (isNaN(amount) || amount <= 0) { resultDiv.innerHTML = "Please enter a valid positive amount to convert."; return; } if (fromCurrency === toCurrency) { resultDiv.innerHTML = "The 'From' and 'To' currencies are the same. No conversion needed."; return; } var rate = exchangeRates[fromCurrency] ? exchangeRates[fromCurrency][toCurrency] : null; if (rate === null) { resultDiv.innerHTML = "Exchange rate not available for the selected currency pair."; return; } var convertedAmount = amount * rate; resultDiv.innerHTML = "

Conversion Result:

" + "" + amount.toFixed(2) + " " + fromCurrency + " is equal to " + convertedAmount.toFixed(2) + " " + toCurrency + ""; } #exchangeRateCalculator { font-family: sans-serif; border: 1px solid #ccc; padding: 20px; border-radius: 8px; max-width: 600px; margin: 20px auto; background-color: #f9f9f9; } #exchangeRateCalculator h2 { text-align: center; color: #333; margin-bottom: 20px; } .calculator-inputs { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 20px; } .input-group { display: flex; flex-direction: column; } .input-group label { margin-bottom: 8px; font-weight: bold; color: #555; } .input-group input[type="number"], .input-group select { padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; } button { display: block; width: 100%; padding: 12px; background-color: #007bff; color: white; border: none; border-radius: 4px; font-size: 1.1rem; cursor: pointer; transition: background-color 0.3s ease; } button:hover { background-color: #0056b3; } .calculator-result { margin-top: 25px; padding: 15px; background-color: #e9ecef; border: 1px solid #dee2e6; border-radius: 4px; text-align: center; } .calculator-result h3 { margin-top: 0; color: #007bff; }

Leave a Comment