Add the daily USD to JPY rates, then divide by the number of days with a rate. The result is the average JPY per USD for that period. The calculation uses example numbers from the response at 29 Oct 2026, 23:25 UTC, with a date window of 2026-09-30 to 2026-10-29.
Choose the period and quote direction
Use USD as the base and JPY as the symbol for the last 30 days. Every value then has the same unit, JPY per USD. The API quotes every currency against USD, so this pair gives you the daily inputs for the average directly.
The example window runs from 2026-09-30 to 2026-10-29. The free tier includes 30 days of daily history; older dates need a plan with more history. Use the dates of the accounting period or invoice batch you want the average to describe.
Read the rates in the data array
The range response keeps its daily rows in data. Each row has date, rates and source. Read the JPY value from each row's rates object. The row's source identifies the daily reference fix that the value comes from.
The response also has result, base, start_date and end_date, plus next_cursor, has_more and notice. Check the returned date window against the period you selected. The daily rows are the inputs to the calculation, so count those rows when you prepare the divisor.
curl "https://api.exchangerate.dev/v1/range?base=USD&symbols=JPY&start_date=2026-09-30&end_date=2026-10-29"Divide the sum by the returned row count
The formula is average = sum of the daily rates / number of days with a rate. For this window, 22 daily rates add up to 3,474.297 JPY per USD. Divide that sum by 22 to get 157.923 JPY per USD.
The example series was captured at 29 Oct 2026, 23:25 UTC. Its lowest daily rate is 156.803 JPY per USD and its highest is 158.599 JPY per USD. These are the smallest and largest daily values in the series.
| Step | Calculation | Result |
|---|---|---|
| Days with a rate | 2026-09-30 to 2026-10-29 | 22 |
| Sum of the daily rates | 22 rates of JPY per USD | 3,474.297 |
| Average | 3,474.297 ÷ 22 | 157.923 JPY per USD |
| Lowest to highest | smallest and largest daily rate | 156.803 to 158.599 |
Use the mean for the selected period
The result describes the simple mean of the daily reference fixes for an accounting period or invoice batch. Each returned daily rate has equal weight in the formula. A day with a larger invoice amount has the same weight as any other day with a rate.
A simple mean of daily rates is not a volume-weighted rate. Keep that distinction clear when you use 157.923 JPY per USD for a batch: the calculation uses daily rates and their count, with no transaction volumes in its inputs.
Count days with a reference fix
Divide by the number of rows returned, not by the calendar days in the window. The endpoint returns a daily reference rate per business day. A Friday row is followed by a Monday row because weekends have no row.
A public holiday of the fixing source can also leave a date without a fix. That date has no row and contributes nothing to either the sum or the count. A 30-day calendar window therefore uses the returned row count as its divisor.
Check access limits and timestamps
Keyless calls allow 10 requests a minute and 100 an hour per IP, with rates 15 minutes late. A free key has 5,000 requests a month and 10 requests a minute, also with rates 15 minutes late. Paid plans are live.
A latest response carries source, market_session, timestamp, data_updated_at and rates, plus the notice "Indicative rates, not for settlement." The range response has no data_updated_at; 29 Oct 2026, 23:25 UTC records when the example series was captured.
The rates are indicative mid-market figures, not for settlement or trading. Banks, cards and transfer services apply their own spread and fees. The period average uses the daily reference fixes returned by the API.