🌐
Grafana
community.grafana.com › prometheus
Rate and irate display very different values - Prometheus - Grafana Labs Community Forums
April 4, 2018 - Hello, I’ve got the two following sentences on two different graphs: rate(node_disk_bytes_read{job=“node_exporter”}[5m]) irate(node_disk_bytes_read{job=“node_exporter”}[5m]) The unit is bytes. As you can see in the attached image, on one graph the maximum reaches almost 12MiB, whereas ...
🌐
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 ... 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....
Discussions

What should I use for time on irate/rate?
Hey folks, I’m new to Grafana and am trying to understand how time is used when generating irate/rate charts. We are using Prometheus as our primary datasource on a Kubernetes cluster using the stable/prometheus chart. When I imported a dashboard from the marketplace, I noticed it had ... More on community.grafana.com
🌐 community.grafana.com
1
0
May 3, 2018
irate() Vs rate() Functions in Prometheus

Let’s say you have a counter with these values observed at 1m intervals:

0
60
120
600
720
780

Now rate over 5m will be:

(780-0)/5/60 = 2.6/sec

And irate over 5m will be (only last two data points are used which happen to be only 1m apart)

(780-720)/1/60 = 1/sec

Increasing the resolution does not affect the irate function because the last two observed values do not change when you look further back.

More on reddit.com
🌐 r/PrometheusMonitoring
9
12
February 4, 2020
Rate and irate display very different values
irate uses only two last data points on each interval between subsequent pixels (aka step), while rate calculates average per-second rate over all the data points on each interval. Read more here. More on community.grafana.com
🌐 community.grafana.com
4
1
April 4, 2018
prometheus - Rate of the metric aggregated by label - Stack Overflow
Additionally both rate and irate require at least two samples in range vector to return anything. I doubt that you have a scrape interval of less then 8 seconds. So most likely you range selector is incorrect, and you need something bigger like [30s] or anything, but at least twice your scrape interval. And if you are planning to use it in Grafana ... More on stackoverflow.com
🌐 stackoverflow.com
People also ask

Can rate() be used with all types of Prometheus metrics?
No, rate() should only be used with counter-metrics. It doesn't make sense to use rate() with gauge metrics, as they don't represent cumulative values.
🌐
last9.io
last9.io › blog › prometheus-rate-function
Prometheus Rate Function: A Practical Guide to Using It | Last9
How do you calculate request rates using the Prometheus rate function?
To calculate request rates, use a query like rate(http_requests_total[5m]). This will give the per-second rate of requests over the last 5 minutes. These rates can be summed or grouped as needed, e.g., sum(rate(http_requests_total[5m])) for the total request rate across all instances.
🌐
last9.io
last9.io › blog › prometheus-rate-function
Prometheus Rate Function: A Practical Guide to Using It | Last9
How do you calculate the increase of a counter over time using Prometheus functions?
To calculate the total increase of a counter, use the increase() function. For example, increase(http_requests_total[1h]) will show the total increase in the number of requests over the last hour.
🌐
last9.io
last9.io › blog › prometheus-rate-function
Prometheus Rate Function: A Practical Guide to Using It | Last9
🌐
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.
🌐
Last9
last9.io › blog › grafana-rate-function
Why Grafana's Rate Function Is Your Dashboard's Best Kept Secret | Last9
April 25, 2025 - Once you’re comfortable with the basics, these advanced techniques will take your monitoring to the next level. ... While rate calculates the average rate over the time range, irate uses only the last two data points.
🌐
Last9
last9.io › blog › prometheus-rate-function
Prometheus Rate Function: A Practical Guide to Using It | Last9
June 15, 2026 - The key difference is that rate() averages across your entire time range, providing stability at the cost of potentially masking brief spikes, while irate() is more responsive but produces noisier visualizations.
🌐
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.
🌐
Grafana
community.grafana.com › t › what-should-i-use-for-time-on-irate-rate › 7217
What should I use for time on irate/rate? - Grafana - Grafana Labs Community Forums
May 3, 2018 - Hey folks, I’m new to Grafana and am trying to understand how time is used when generating irate/rate charts. We are using Prometheus as our primary datasource on a Kubernetes cluster using the stable/prometheus chart. When I imported a dashboard from the marketplace, I noticed it had rate(query_field{app="selector"}[15s]). However, this resulted in “no data” on the graphs.
🌐
Reddit
reddit.com › r/prometheusmonitoring › irate() vs rate() functions in prometheus
r/PrometheusMonitoring on Reddit: irate() Vs rate() Functions in Prometheus
February 4, 2020 -

Hi All,

I'm trying to understand how irate() & rate() functions work. Why does irate() produce a similar looking graph when the range / resolution is 24h or 5m ? While the difference in graph is clearly visible with rate() when using range as 24h (presents a smoothed out line) or 5m(more spikey).

In the below graph for irate() for 2 different resolutions the graph looks the same. As per prometheus docs irate() calculates the per second instant rate based on the last two data points. What does this mean if my range is 24h? Thank you.

https://preview.redd.it/08mc4pq2mye41.jpg?width=3206&format=pjpg&auto=webp&s=4aef0b681969c8b9831ec0f34310838511ea0350

Find elsewhere
🌐
Grafana
community.grafana.com › prometheus
Rate and irate display very different values - #2 by valyala - Prometheus - Grafana Labs Community Forums
April 4, 2018 - irate uses only two last data points on each interval between subsequent pixels (aka step), while rate calculates average per-second rate over all the data points on each interval. Read more here.
🌐
Medium
medium.com › @marcoghisellini › irate-vs-rate-whatre-they-telling-you-91ab0645a892
irate() vs rate() — What’re they telling you? | by Marco Ghisellini | Medium
December 23, 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.
🌐
GitHub
github.com › kubernetes-monitoring › kubernetes-mixin › issues › 670
The change from rate() to irate() is a breaking change · Issue #670 · kubernetes-monitoring/kubernetes-mixin
I recently upgraded to kube-prometheus-stack and discovered that CPU data no longer shows on old Grafana Kubernetes / Compute Resources / Workload dashboard that was hosted somewhere else. It turns out that the following change from rate() to irate() was the cause of the issue:
Author: kubernetes-monitoring
🌐
MetricFire
metricfire.com › blog › understanding-the-prometheus-rate-function
How the Prometheus rate() function works | MetricFire
March 12, 2026 - ... The nice thing about the rate() function is that it considers all data points, not just the first and last ones. Another function, irate, uses only the first and last data points.
🌐
GitHub
github.com › grafana › grafana › issues › 118276
Prometheus 2.0 Dashboard: Should use `rate` instead of `irate` · Issue #118276 · grafana/grafana
February 17, 2026 - Proper rate calculation at zoomed out levels. Please go over each metric in the dashboard and replace irate by rate.
Author: grafana
🌐
Medium
medium.com › @kavyaprathyusha › rate-vs-irate-in-promql-a172e3d9c38f
rate() vs irate() in promQL - by Kavya Prathyusha Chekka
August 16, 2021 - rate() is generally used when graphing the slow moving counters. While irate() is used when graphing the high volatile counters.
🌐
Medium
valyala.medium.com › why-irate-from-prometheus-doesnt-capture-spikes-45f9896d7832
Why irate from Prometheus doesn't capture spikes | by Aliaksandr Valialkin | Medium
November 17, 2021 - The only difference is modified step in Grafana from 20m to 21m. ... As you can see, these graphs look completely different and they definitely don’t catch spikes. ... Green rate line is much more consistent on these graphs comparing to yellow ...
🌐
Timesofcloud
timesofcloud.com › home › prometheus grafana
Prometheus & Grafana — Rate & Increase -
March 30, 2026 - Best Practice: Use rate() for alerts (avoids false positives from spikes). Use irate() only for real-time dashboards where you want to see spikes.
🌐
Grafana
community.grafana.com › prometheus
Metrics sum of rate or irate - Prometheus - Grafana Labs Community Forums
October 24, 2019 - This process-exporter have 2 mode (user and system), i want to have sum 2 of it (calculate the % of CPU) So i use this, and the result … It only can rate user or system, not both of them, what should i do ? Plea…
🌐
Grafana
community.grafana.com › prometheus
Rate and irate display very different values - #3 by vinci - Prometheus - Grafana Labs Community Forums
April 4, 2018 - Hello, I’ve got the two following sentences on two different graphs: rate(node_disk_bytes_read{job=“node_exporter”}[5m]) irate(node_disk_bytes_read{job=“node_exporter”}[5m]) The unit is bytes. As you can see in the …
🌐
GitHub
github.com › kubernetes › autoscaler › issues › 5490
rate vs irate for container_cpu_usage_seconds_total · Issue #5490 · kubernetes/autoscaler
February 9, 2023 - irate should only be used when graphing volatile, fast-moving counters. Use rate for alerts and slow-moving counters, as brief changes in the rate can reset the FOR clause and graphs consisting entirely of rare spikes are hard to read.
Author: kubernetes