There are no interrelations between these two settings. For example, if rate(http_requests_total{job="api-server"}[5m]) is your PromQL query, it yields a single value when you execute it at a specific point in time. If you have a Grafana dashboard with a 2h time range, then Grafana just repeatedly executes this query at a series of point in times during the past 2 hours, and displays you the result of each query as e.g. a graph.

For example, if the time range of your Grafana dashboard is 2h and the interval is set to 1 minute, then Grafana executes your query 120 times during the time span ranging the past 2 hours. The results of all these queries form a graph and that's what you see in your Grafana dashboard.

The interval with which Grafana executes the query is determined by the Max data points and Min interval settings in the Query options of your Grafana dashboard:

See the explanations about these settings in the Grafana documentation.

Note: Grafana uses the query_range endpoint of the Prometheus API to repeatedly execute the query over the given time range.

Answer from weibeld on Stack Overflow
🌐
Last9
last9.io › blog › grafana-rate-function
Why Grafana's Rate Function Is Your Dashboard's Best Kept Secret | Last9
April 25, 2025 - For example, knowing you’ve served 10 million requests since your app started isn’t as useful as knowing you’re currently handling 200 requests per second. Getting started with the rate function is straightforward. Here’s the basic syntax to use in your Grafana queries:
🌐
Grafana
grafana.com › docs › k6 › latest › javascript-api › k6-metrics › rate
Rate | Grafana k6 documentation
For example: rate < 0.1 // less than 10% rate >= 0.9 // more or equal to 90% The value of the rate variable ranges between 0.00 and 1.00. JavaScript Copy · import { Rate } from 'k6/metrics'; const myRate = new Rate('my_rate'); export default ...
Discussions

What is the exact fomula of the funtion rate?
I use the folowing metrics : rate(fuelBurningTime{job=“Raspberry”}[$__rate_interval]) but i did not found in the documentation the exact calculation done by this rate function. Il mathematics I understand rate as dervative. But question is what is the interval used? is ther many point inside ... More on community.grafana.com
🌐 community.grafana.com
6
0
February 10, 2022
How can I understand rate() ?
So in your example, each point on the graph would be the rate in change over one minute, and the graph would show 3 hours worth of data points. More on reddit.com
🌐 r/grafana
4
3
November 21, 2021
Applying a rate function to positive and negative changes
I’ve set up a new graph in Grafana showing the change of a metric using the rate() function. However, it seems to work in inverse (showing a positive value when the gauge drops) and does not show any change when the gauge increases. I’ve plotted the original gauge (yellow, right axis) along ... More on community.grafana.com
🌐 community.grafana.com
1
1
June 22, 2018
Grafana / prometheus: understand rate function - Stack Overflow
Using Grafana to graph a simple timeline from prometheus: Why there is a such difference between rate and avg function? rate give point less then minimum value More on stackoverflow.com
🌐 stackoverflow.com
February 2, 2021
🌐
MetricFire
metricfire.com › blog › understanding-the-prometheus-rate-function
How the Prometheus rate() function works | MetricFire
March 12, 2026 - In Prometheus's query language, PromQL, the rate() function is used to determine the average per-second rate of increase of a counter metric over a given time range. It is particularly useful for understanding the behavior of metrics that are expected to increase monotonically, such as the total number of HTTP requests received by a server.Customizable Managed Grafana Dashboards
🌐
Grafana
community.grafana.com › prometheus
What is the exact fomula of the funtion rate? - Prometheus - Grafana Labs Community Forums
February 10, 2022 - I use the folowing metrics : rate(fuelBurningTime{job=“Raspberry”}[$__rate_interval]) but i did not found in the documentation the exact calculation done by this rate function. Il mathematics I understand rate as de…
🌐
Grafana
grafana.com › blog › 2020 › 09 › 28 › new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work
New in Grafana 7.2: \$\_\_rate_interval for Prometheus rate queries that just work | Grafana Labs
September 29, 2020 - Grafana helpfully tells us about ... see, the interval is only 15s. Our Prometheus server is configured with a scrape interval of 15s, so we should use a range of at least 1m in the rate query....
🌐
Reddit
reddit.com › r/grafana › how can i understand rate() ?
r/grafana on Reddit: How can I understand rate() ?
November 21, 2021 -

Hi everyone, I'm stupid. I can't figure out exactly how to interpret rate() in Prometheus.

node_network_transmit_bytes_total{} is just a counter. Use rate() for a rate. Got it.

rate(node_network_transmit_bytes_total{}[1m]) sounds like it should be interpreted as: "How many bytes were transmitted over a minute", but then there's the time range settings in the upper right. Would "Last 3 hours" mean, the average transmit rate per minute for the last 3 hours?

Basically, could someone explain what: rate(node_network_transmit_bytes_total{}[1m]) with a time range of "Last 3 hours" would indicate? None of the explanations I've found on blogs, etc make sense to my smooth brain. I'm basically just trying to see the transmit rate in Mbps, MB/s, or MB/h, for each node.

Find elsewhere
🌐
Timesofcloud
timesofcloud.com › home › prometheus grafana
Prometheus & Grafana — Rate & Increase -
March 30, 2026 - rate = (last_value - first_value) / time_window_seconds Example: First value at t=0: 1000 Last value at t=300s: 1150 rate = (1150 - 1000) / 300 = 0.5 req/sec
🌐
Grafana
grafana.com › docs › plugins › alexanderzobnin-zabbix-app › latest › reference › functions
Functions reference | Grafana Plugins documentation
Learn how to unify, correlate, and visualize data with dashboards using Grafana. ... No results. ... Takes each timeseries and consolidate its points fallen in the given interval into one point using function, which can be one of: avg, min, max, median. ... Takes timeseries and multiplies each point by the given factor. ... Converts absolute values to delta. This function just calculate difference between values. For the per-second calculation use rate().
🌐
Medium
medium.com › @bhupender.rawat4 › demystifying-prometheus-a-deep-dive-into-rate-and-irate-ce02745231fc
Demystifying Prometheus: A Deep Dive into rate() and irate() | by Bhupender Singh Rawat | Medium
May 7, 2025 - This setup is crucial for understanding how rate() and irate() behave when applied to such metrics. ... NOTE: This is only for assumption, we will not create any application and library to setup this architecture. Now, using either the Prometheus UI or Grafana Explore, we can inspect each metric and its corresponding values in real time.
🌐
Last9
last9.io › blog › prometheus-rate-function
Prometheus Rate Function: A Practical Guide to Using It | Last9
June 15, 2026 - Here is a complete example for monitoring request rates across API endpoints: Instrument the API: Expose a counter metric, api_requests_total, with labels for the endpoint and method. Create a Grafana Dashboard: Use the following PromQL query to visualize the request rates:
🌐
Chris's Wiki
utcc.utoronto.ca › ~cks › space › blog › sysadmin › PrometheusRateVsIrate
rate() versus irate() in Prometheus (and Grafana)
November 5, 2018 - Suppose that you have a continuously updating metric that Prometheus scrapes every fifteen seconds. To do a rate() or irate() of this, you need at least two metric points and thus a range interval of thirty seconds (at least; in practice you need a somewhat larger interval).
🌐
Grafana
community.grafana.com › t › applying-a-rate-function-to-positive-and-negative-changes › 8243
Applying a rate function to positive and negative changes - Grafana - Grafana Labs Community Forums
June 22, 2018 - I’ve set up a new graph in Grafana showing the change of a metric using the rate() function. However, it seems to work in inverse (showing a positive value when the gauge drops) and does not show any change when the gauge increases. I’ve plotted the original gauge (yellow, right axis) along with the rate function (green, left axis) to demonstrate this behavior: The following Prometheus queries were used to create them: Rate of change - min(rate(metric_name{cluster=“$cluster”, cluster_type=...
🌐
Grafana
grafana.com › docs › tempo › latest › metrics-from-traces › metrics-queries › functions
TraceQL metrics functions | Grafana Tempo documentation
The rate function calculates the number of matching spans per second that match the given span selectors. The following query shows the rate of errors by service and span name. This is a TraceQL specific way of gathering rate metrics that would ...
🌐
Medium
mopitz.medium.com › understanding-prometheus-rate-function-15e93e44ae61
Understanding Prometheus Rate Function | by Mopitz | Medium
June 21, 2021 - And from that group of points, we are going to apply the rate() function. This will calculate the average rate of increase of each group. So it would look like this: ... Each value, let’s say X, means that in 1 minute the process was running X in each second of that minute. So an example would be:
🌐
Tech Annotation
techannotation.wordpress.com › 2021 › 07 › 19 › irate-vs-rate-whatre-they-telling-you
irate() vs rate() – What're they telling you? - Tech Annotation
July 22, 2021 - It depends on what you’re going to show and what you want to highlight. irate() is more susceptible to data variations, while rate() gives us an overall traffic trend of our application. As you’ve seen, the range interval play an important role in this calc. A best practice suggests us to set this value in the range of 10-60s. Take note, another good practice to avoid data misinterpretation is to set, inside Grafana, Prometheus data source “Scrape interval” with the same interval of Prometheus configuration.
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › functions
Query functions | Prometheus
Use the rate() function to specify the time window for the quantile calculation. Example: A histogram metric is called http_request_duration_seconds (and therefore the metric name for the buckets of a classic histogram is http_request_duration_seconds_bucket).
🌐
Medium
medium.com › @pradeepsunku › mastering-prometheus-queries-in-grafana-99b3849b1e03
Mastering Prometheus Queries in Grafana | by PradeepSunku | Medium
August 10, 2024 - While Grafana offers a highly customizable interface for visualizing metrics, mastering Prometheus queries is key to unlocking its full potential. In this article, we’ll explore some essential Prometheus query tips, helping you build more effective dashboards and alerts. ... histogram_quantile(0.99, sum(rate(http_client_requests_seconds_bucket{app=”some-app”}[$__interval])) by (pod_name, le))