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
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › functions
Query functions | Prometheus
The quantile is calculated for each label combination in http_request_duration_seconds. To aggregate, use the sum() aggregator around the rate() function. Since the le label is required by histogram_quantile() to deal with classic histograms, it has to be included in the by clause.
🌐
MetricFire
metricfire.com › blog › understanding-the-prometheus-rate-function
How the Prometheus rate() function works | MetricFire
March 12, 2026 - The rate() function in Prometheus is a fundamental tool for monitoring systems, enabling users to calculate the per-second average rate of increase of counter metrics over a specified time range.
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 does prometheus rate works with grafana? - Stack Overflow
15 Understanding increase() and rate() used on http_server_requests_seconds_count with prometheus and Grafana More on stackoverflow.com
🌐 stackoverflow.com
How to calculate the number of requests in a time period using PromQL
Hello, community! I am building a dashboard in Grafana to monitor the latency and the number of requests made to a specific API. The metrics are being collected via Google Cloud Managed Service for Prometheus and accessed in Grafana using Google Cloud Monitoring as the data source. More on community.grafana.com
🌐 community.grafana.com
4
0
November 21, 2024
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
🌐
Last9
last9.io › blog › grafana-rate-function
Why Grafana's Rate Function Is Your Dashboard's Best Kept Secret | Last9
April 25, 2025 - Grafana’s rate() function helps you make sense of noisy metrics, spot trends faster, and build dashboards that tell a clearer story.
🌐
Grafana
grafana.com › docs › k6 › latest › javascript-api › k6-metrics › rate
Rate | Grafana k6 documentation
Rate is an object for representing a custom metric keeping track of the percentage of added values that are non-zero.
🌐
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 dervative. But question is what is the interval used? is ther many point inside ...
🌐
Grafana
grafana.com › blog › 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 - The range in a rate query should be at least four times the scrape interval. For graphing with Grafana, the variable $__interval is really useful to specify the range in a rate query.
Find elsewhere
🌐
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 - Check the Grafana dashboard for visual representation. ... Once you add the datasource. Import the dashboard using dashboard.json content present in the repository. You will see three visualization panel as shown below. Below is the representation of following panels. total http request count [testpath_requests_total] ... both rate() and irate() are essential functions for analyzing counter metrics in Prometheus, but they serve different purposes.
🌐
Grafana
grafana.com › pricing
Grafana Pricing | Free, Pro, Enterprise
Use the interactive calculator to see what you'll pay at your scale. Pricing is volume-based and tiered, so your effective rate drops automatically as you grow. All the details you need to know about pricing and plans. Fully-managed, highly-scalable metrics service in Grafana Cloud with built-in ...
🌐
Grafana
community.grafana.com › t › how-to-calculate-the-number-of-requests-in-a-time-period-using-promql › 136815
How to calculate the number of requests in a time period using PromQL - Grafana - Grafana Labs Community Forums
November 21, 2024 - Hello, community! I am building a dashboard in Grafana to monitor the latency and the number of requests made to a specific API. The metrics are being collected via Google Cloud Managed Service for Prometheus and access…
🌐
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=...
🌐
Zenduty
community.zenduty.com › monitoring and observability › grafana
Why am I not getting any data when using rate() function in Grafana? - Grafana - Zenduty Community
January 2, 2024 - Hello community, i have a weird behavior in grafana. I am using prometheus as datasource to query the metrics. when i use node_cpu_seconds_total{} query, i get all the values. But the catch is, when i use it with the rat…
🌐
Chris's Wiki
utcc.utoronto.ca › ~cks › space › blog › sysadmin › PrometheusRateVsIrate
rate() versus irate() in Prometheus (and Grafana)
November 5, 2018 - With a small query step and thus a high level of detail, you probably want to use irate() with a range interval that's large enough to cover three or four metric points. But for large query steps and only broad details, irate() will throw away huge amounts of information and you need to use rate() instead. This is where we come to Grafana.
🌐
Grafana
community.grafana.com › prometheus
Difficulties to display the right information with rate/increase PromQL function - Prometheus - Grafana Labs Community Forums
April 23, 2025 - Hi, I’m having some difficulties to display some values and to interprete them. My setup is : sFlow RT and Prometheus Exporter (to export network metrics in bits/sec) => Prometheus (where metrics are created/filtered) => Grafana (to display metrics, in Gbits/sec) Prometheus sFlow metrics ...
🌐
Grafana
grafana.com › docs › loki › latest › query › metric_queries
Metric queries | Grafana Loki documentation
The Markdown version is available at https://grafana.com/docs/loki/latest/query/metric_queries.md, or by sending Accept: text/markdown to https://grafana.com/docs/loki/latest/query/metric_queries/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt. ... Metric queries extend log queries by applying a function to log query results. This powerful feature creates metrics from logs. Metric queries can be used to calculate the rate of error messages or the top N log sources with the greatest quantity of logs over the last 3 hours.
🌐
SigNoz
signoz.io › guides › what is the difference between prometheus rate vs increase functions
Prometheus rate vs increase Functions Explained | SigNoz
June 23, 2026 - Choose between rate() and increase() based on your specific monitoring needs. Proper use of these functions is crucial for accurate data interpretation and alerting. For more on Prometheus, the Prometheus alternatives roundup goes broader, and the Prometheus vs Grafana, OpenTelemetry vs Prometheus, Loki vs Prometheus, and Prometheus vs InfluxDB comparisons cover adjacent matchups.
🌐
SigNoz
signoz.io › guides › grafana guide - how to graph http requests per minute
Grafana Guide - How to Graph HTTP Requests per Minute | SigNoz
October 14, 2024 - ... Since Grafana doesn’t have a built-in option to display requests per minute, you will need to manually convert the per-second rate by multiplying it by 60, which leads us to the next step.
🌐
Medium
medium.com › @pradeepsunku › mastering-prometheus-queries-in-grafana-99b3849b1e03
Mastering Prometheus Queries in Grafana | by PradeepSunku | Medium
August 10, 2024 - For example, using rate(http_requests_total[$__rate_interval]) ensures that the rate calculation adapts to the dashboard's current resolution, making it suitable for both high and low-resolution data. Note: Using $__interval in your Grafana queries is often sufficient for many types of queries, particularly when you want your data to automatically adjust to the dashboard's time range and resolution.
🌐
Grafana
community.grafana.com › prometheus
How to display the value of $__rate_interval? - Prometheus - Grafana Labs Community Forums
August 6, 2023 - We use Grafana 8 together with Prometheus. I created a dashboard and I use the automatically generated variable $__rate_interval all over the panels. For visibility, in favor of other users of the dashboard, I would li…
🌐
Grafana
grafana.com › events › grafanacon › 2020 › prometheus-rate-queries-in-grafana
Prometheus rate queries in Grafana - GrafanaCONline | Grafana Labs
May 27, 2020 - But do not despair, this talk will teach you all you have to know, even in case when you add to the mix recording rules, which are blissfully ignorant of any dynamic range requested by Grafana. If all goes well, we can even inaugurate a nifty little new feature in the Prometheus data source that will improve your rate visualizations even more.