Google Sheets Currency Conversion: Formulas and Historical Rates
Convert currencies in Google Sheets with GOOGLEFINANCE and FxFeed. Copy formulas for current rates, historical dates and invoices in multiple currencies.
Updated
To convert US dollars to euros in Google Sheets, multiply the amount by GOOGLEFINANCE("CURRENCY:USDEUR"). For example, =A2*GOOGLEFINANCE("CURRENCY:USDEUR") converts the dollar amount in A2 to euros. The first code is the source currency; the second is the target.
This guide covers current-rate formulas, currency codes from cells, historical rates by date and invoices in several currencies. For the FxFeed functions' installation and reference, use the Google Sheets integration guide.
Currency conversion formula
Use these formulas in a sheet with an amount in A2:
| Task | Formula |
|---|---|
| USD to EUR exchange rate | =GOOGLEFINANCE("CURRENCY:USDEUR") |
| Convert the USD amount in A2 to EUR | =A2*GOOGLEFINANCE("CURRENCY:USDEUR") |
| Round that result to two decimal places | =ROUND(A2*GOOGLEFINANCE("CURRENCY:USDEUR"),2) |
| Reverse the conversion, from EUR to USD | =A2*GOOGLEFINANCE("CURRENCY:EURUSD") |
Changing a cell's currency format changes its symbol and display, not its value. Multiply by an exchange rate to change the amount. Examples use commas as argument separators; some spreadsheet locales require semicolons.
Use currency codes from cells
Put the amount in A2, the source code (such as USD) in B2 and the target code (such as EUR) in C2:
=IF(B2=C2,A2,A2*GOOGLEFINANCE("CURRENCY:"&B2&C2))
Fill down to convert other rows. Use three-letter codes, not currency symbols: $ alone does not identify a currency. For many amounts sharing one pair, put the rate in a separate cell and multiply each amount by an absolute reference to it, such as =A2*$F$2.
Convert currency on a specific date
GOOGLEFINANCE can also show historical data. Put a real date in D2, for example with =DATE(2024,1,2), and request the pair from B2 and C2:
=GOOGLEFINANCE("CURRENCY:"&B2&C2,"price",D2)
Leave space for the returned table. Historical results include headers and a date column, even for one day. To convert A2 using its rate cell:
=IF(B2=C2,A2,A2*INDEX(GOOGLEFINANCE("CURRENCY:"&B2&C2,"price",D2),2,2))
Inspect the returned date before relying on the value. A missing observation or unsupported pair can produce an error; do not replace it with zero or today's rate. If the workflow allows a previous available date, make that policy explicit.
Google's GOOGLEFINANCE documentation explains that quotes can be delayed, availability varies, and historical output cannot be read through the Sheets API or Apps Script. That restriction does not prevent viewing historical results inside a sheet. Google also documents usage restrictions; check them for your intended use.
When to use FxFeed custom functions
The FxFeed API supplies the FXRATE, FXCONVERT and FXRATES functions below. Use them when you want a documented API behind both your spreadsheet and your application. The free plan provides daily data; paid plans provide hourly updates. These are reference rates, not executable bank or card quotes.
Install the FxFeed functions
The functions are a single Apps Script file. Installing it takes about three minutes:
- Get a key. Get a free API key. The free plan includes 1,000 requests a month with daily data, and the script is built to use very few of them.
- Open Apps Script. In your spreadsheet, choose Extensions → Apps Script.
- Paste the script. Replace the contents of
Code.gswith the FxFeed script and click Save. - Reload the spreadsheet. A new FxFeed menu appears.
- Set the key. Choose FxFeed → Set API key and paste your key. Google asks you once to authorize the script, because it connects to an external service.
The key is stored in the script's properties, not in a cell, so it does not travel with a copied range, a download or a published sheet. The full install guide, with the script shown inline, is on the Google Sheets documentation page.
FXRATE: one exchange rate
=FXRATE("USD", "EUR")
returns how many euros one US dollar buys, at the latest rate. Add a date for a past day:
=FXRATE("EUR", "USD", "2024-01-02")
That formula returns 1.095601. The date can be text in YYYY-MM-DD form or, more usefully, a date cell: =FXRATE("EUR", "USD", A2). Dates are read in the spreadsheet's own time zone, so a date typed into a cell means that calendar day wherever you are.
If a historical response has no rates, the script looks back up to seven calendar days for the latest nonempty rate table. If that table lacks the requested currency, the formula reports an error. This is the script's fallback policy, not a rule for how you must book a transaction. Coverage varies by currency; check historical coverage before selecting a date. Some currencies have data back to 1999; others start later.
FXCONVERT: amounts, one or a column at a time
=FXCONVERT(100, "USD", "EUR", "2024-01-02")
returns 91.2741: 100 dollars in euros at that day's rate. Pass a range to convert a whole column in one formula:
=FXCONVERT(C2:C200, "USD", "EUR")
FXCONVERT multiplies by exactly the rate FXRATE returns for the same arguments, so a converted column always agrees with a rate column beside it. Blank cells stay blank. Wrap it in ROUND for display, =ROUND(FXCONVERT(C2, "USD", "EUR"), 2), or use a currency number format.
FXRATES: a table of rates
=FXRATES("USD", "EUR,GBP,JPY")
fills three rows: the currency code in the first column, the rate in the second. Leave out the second argument for every currency the API quotes (160+) against that base, and add a date as the third argument for a past day. It is a handy lookup table: put it on a hidden sheet and use VLOOKUP or XLOOKUP against it from the rest of the workbook.
Convert invoices row by row
A typical sheet has one row per invoice:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Currency | Amount | Amount in EUR |
| 2 | 2024-01-02 | USD | 1,200.00 | =FXCONVERT(C2, B2, "EUR", A2) |
| 3 | 2024-01-05 | GBP | 850.00 | =FXCONVERT(C3, B3, "EUR", A3) |
| 4 | 2024-01-06 | USD | 99.00 | =FXCONVERT(C4, B4, "EUR", A4) |
Fill column D down and every invoice is converted at the rate of its own date; row 4, a Saturday, uses Friday's rate. If an invoice is already in euros, FXCONVERT returns the amount unchanged without making a request.
To show the rate used next to each row, add =FXRATE(B2, "EUR", A2) in column E. These functions return amounts and rates, not the actual observation date used by the fallback. If you need to retain that date, inspect the Rate Explorer or use the Python historical-rate example, which returns it explicitly.
Recipe: a price list for another market
Keep your prices in one currency and let the sheet derive the rest:
=ROUND(FXCONVERT(B2:B50, "USD", "GBP"), 2)
Because this uses the latest rate, the result changes when rates move. If a published price list must stay fixed, point the date argument at a cell holding the day the prices were set, so the sheet is reproducible later.
How the functions save your quota
Every request counts towards your plan's monthly allowance, so the script is careful with them:
- Share cached rates. The first
FXRATE("USD", …)fetches every USD rate at once; other formulas with the same base and date can reuse that cache entry. - Caching. Latest rates are cached for an hour and past days for six hours, the longest Apps Script's
CacheServicekeeps anything. - Ranges share a lookup.
FXCONVERT(C2:C200, …)uses one rate lookup for the whole range. Missing-date fallback and retries can require additional requests; cache hits require none. - Formulas that cannot succeed make no request. A mistyped currency code or date is reported before anything is sent.
Usage depends on recalculation, cache eviction, the number of distinct base/date combinations and any retries. Check your dashboard usage before estimating whether a workbook fits the free plan. See pricing for request limits and hourly-data plans.
Google Sheets decides when to recalculate custom functions, mostly when their arguments change. To force a fresh latest rate, change an argument or re-enter the formula.
When something goes wrong
A formula that fails shows #ERROR!; hover over the cell to read the reason. The most common ones:
- No FxFeed API key: choose FxFeed → Set API key. If the menu is missing, reload the spreadsheet.
- FxFeed rejected the API key (401): copy the key again from your dashboard and set it again.
- Monthly request limit reached (402): the message includes a link to upgrade; otherwise the count starts again on the first of the month (UTC).
- Rate limit reached (429): hundreds of formulas asked at the same moment. The script already retries; wait a few seconds.
- "from" must be a three-letter currency code: use ISO codes such as
USD,EURorJPY. The currency list shows every code.
Beyond spreadsheets
For one dated invoice without a spreadsheet, use the historical currency converter.
The functions call the same API you would use from code, so a sheet can be a prototype for something bigger. When it outgrows Sheets, the Python guide and the JavaScript guide show the same requests in code, and the API reference documents every endpoint. Comparing data providers first? See how FxFeed compares with Open Exchange Rates, Fixer and ExchangeRate-API.
Get a free API key, paste the script, and type =FXRATE("USD", "EUR").
Ready to integrate FX rates?
Start using FxFeed.io today with our free tier. No credit card required.