The "increase" function calculates how much some counter has grown and the "rate" function calculates the amount per second the measure grows.

Analyzing your data I think you used [30s] for the "increase" and [1m] for the "rate" (the correct used values are important to the result).

Basically, for example, in time 2m we have:

increase[30s] = count at 2m - count at 1.5m = 4423 - 4402 = 21
rate[1m]      = (count at 2m - count at 1m) / 60 = (4423 - 4381) / 60 = 0.7

Prometheus documentation: increase and rate.

Answer from Marcelo Ávila de Oliveira on Stack Overflow
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › functions
Query functions | Prometheus
Use the rate() function to specify the time window for the quantile calculation.
🌐
MetricFire
metricfire.com › blog › understanding-the-prometheus-rate-function
How the Prometheus rate() function works | MetricFire
March 12, 2026 - You can also get a free trial and check it out now. 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.
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
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
People also ask

How does the Prometheus rate() function differ from increase()?
While rate() calculates the per-second average rate of increase, increase() calculates the total increase in the counter's value over the time range. rate() is generally more useful for ongoing monitoring, while increase() can help understand total change over a specific period.
🌐
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
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
Top answer
1 of 3
24

The "increase" function calculates how much some counter has grown and the "rate" function calculates the amount per second the measure grows.

Analyzing your data I think you used [30s] for the "increase" and [1m] for the "rate" (the correct used values are important to the result).

Basically, for example, in time 2m we have:

increase[30s] = count at 2m - count at 1.5m = 4423 - 4402 = 21
rate[1m]      = (count at 2m - count at 1m) / 60 = (4423 - 4381) / 60 = 0.7

Prometheus documentation: increase and rate.

2 of 3
15

Prometheus calculates rate(count[d]) at timestamp t in the following way:

  1. It obtains raw samples per each time series with count name on the time range (t-d ... t]. Note that t-d timestamp isn't included in the range, while t timestamp is included in the range. For example, when calculating rate(count[1m]) at a timestamp t=2m the following raw samples are selected: 4423 @ 2m, 4402 @ 1m45s, 4402 @ 1m30s, 4381 @ 1m15s. Note that the 4381 @ 1m sample isn't included in calculations.
  2. Then it calculates the difference between the last and the first sample on the selected time range per each time series with the name count. Prometheus can detect and remove time series resets to zero on the selected time range, but let's skip this for now for the sake of clarity. In the case above it calculates 4423 @ 2m - 4381 @ 1m15s = 42.
  3. Then it divides results from step 2 by the duration d in seconds per each time series with name count. In the case above it calculates 42 / 1m = 42 / 60s = 0.7.

The actual result for rate(count[1m]) @ 2m - 0.700023 - differs from the calculated result - 0.7 - because of extrapolation, which can be applied to results calculated at step 2 if timestamps for the first and/or the last raw sample are located too far from the selected time range bounds. See more details about the extrapolation in this issue.

Note also that Prometheus misses possible counter increase on the time range [1m ... 1m15s] when calculating both rate() and increase(). See more details about this issue here and here.

🌐
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. While both functions handle counter metrics, they serve different monitoring purposes: Histogram Buckets in Prometheus Made Simple | 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 - Let’s start with rate(). This function is your go-to when you want to calculate the average per-second increase of a counter metric over a period of time. Think of it as a smooth operator—it doesn’t care about small spikes or sudden changes, ...
Find elsewhere
🌐
SigNoz
signoz.io › guides › what is the difference between prometheus rate vs increase functions
Prometheus rate vs increase Functions Explained | SigNoz
June 23, 2026 - Rate() calculates per-second average change; increase() shows total change over time. Both functions are essential for analyzing counter metrics in Prometheus.
🌐
Better Stack
betterstack.com › community › questions › do-i-understand-prometheus-rate-vs-increase-correctly
Do I Understand Prometheus's Rate Vs Increase Functions Correctly? | Better Stack Community
December 2, 2024 - The function is written as: ... This returns the average number of requests per second over the last 5 minutes. ... The result is a rate (requests per second) based on the specified time interval.
🌐
VictoriaMetrics
victoriametrics.com › blog › prometheus monitoring: functions, subqueries, operators, and modifiers
Prometheus Monitoring: Functions, Subqueries, Operators, and Modifiers
April 25, 2025 - It uses the actual timestamps of the data points to calculate the rate, whereas Prometheus may use extrapolation to estimate it. You can explore more in the full documentation: https://docs.victoriametrics.com/metricsql/#rollup-functions
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › basics
Querying basics | Prometheus
For example, applying the rate function to gauge floats will most likely produce a nonsensical result, but the query will be processed without complains. However, if applied to gauge histograms, the result of the query will be annotated with a warning. In Prometheus's expression language, an ...
🌐
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 ...
🌐
Last9
last9.io › blog › grafana-rate-function
Why Grafana's Rate Function Is Your Dashboard's Best Kept Secret | Last9
April 25, 2025 - It transforms counter metrics (which ... anomalies. In Prometheus, the rate function calculates the per-second average rate of increase of a time series within a specified time window....
🌐
DoHost
dohost.us › home › 2025 › september › 27 › using promql functions: calculating rates and averages
Using PromQL Functions: Calculating Rates and Averages - DoHost
September 27, 2025 - This tutorial provides a comprehensive guide on using PromQL functions to calculate rates and averages in Prometheus. We’ll start with the basics of rate calculation using the `rate()` function, including its syntax and usage. Then, we’ll explore the `irate()` function and discuss the differences between `rate()` and `irate()`. We’ll dive into calculating averages over time using the `avg_over_time()` function.
🌐
Website-files
assets-global.website-files.com › 6723707b069aea070fb1b050 › 67c4fdf6b13b60623b1b831b_67636590225.pdf pdf
Prometheus rate increase
Prometheus Functions and Their Application The Prometheus monitoring stack offers various functions to analyze data trends, with rate() being one of the most used but misunderstood. This function calculates the per-second average rate of change over time for any value.
🌐
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

🌐
Maxim Articles
getmaxim.ai › articles › top-5-ai-guardrails-platforms-for-responsible-enterprise-ai-in-2026
Top 5 AI Guardrails Platforms for Responsible Enterprise AI in 2026
July 3, 2026 - Audit-ready telemetry: native Prometheus metrics, OpenTelemetry traces, and structured violation records that flow into Grafana, Datadog, and SIEM pipelines, satisfying the NIST AI RMF Measure function and EU AI Act audit trails.
🌐
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 - So what’s the magic behind $__rate_interval? It is simply guaranteed to be at least four times the scrape interval, no matter what. But how does it know what the scrape interval is? That’s actually a very good question, because Prometheus itself only knows the currently configured scrape interval and doesn’t store the scrape interval used for historical data anywhere.
🌐
OneUptime
oneuptime.com › home › blog › how to understand rate() vs increase() in prometheus
How to Understand rate() vs increase() in Prometheus
December 17, 2025 - rate() calculates the per-second average rate of increase over the time range: ... Prometheus also extrapolates to the ends of the range, which helps account for missed scrapes or imperfect alignment between scrape times and the query range.
🌐
Promlabs
promlabs.com › blog › 2021 › 01 › 29 › how-exactly-does-promql-calculate-rates
PromLabs | Blog - How Exactly Does PromQL Calculate Rates?
January 29, 2021 - You can imagine this as rate() creating a set of "virtual" samples from the underlying "real" samples. The final rate is then calculated from the virtual samples, as if the resets had never taken place: Note: Whenever a counter resets, there is the chance that it was incremented after Prometheus's last scrape, but before the reset.
🌐
GitConnected
levelup.gitconnected.com › conquer-promql-how-rate-and-increase-work-38d0acf91a0d
Conquer PromQL — How Rate and Increase Work | by Guy Erez | Level Up Coding
April 16, 2023 - If you decide to query Prometheus for the metric’s value, it’ll look something like this: failed_requests{path=”/cats”} and the result will simply be an integer value - let’s say it’s 10. Now, you wait for 10 minutes and measure it again — you get 12 this time. So how do you calculate the increase? Pretty simple: You call the increase() function...
🌐
SingleStore
singlestore.com › help
Converting PromQL (rate function) into S2 SQL - Help - SingleStore Forums
November 9, 2022 - Cause I’ve got data from NODE_EXPORTER by python packages without PROMETHEUS. So I’m figuring out how to write SingleStore queries comparing with PromQL. PromQL are different from SingleStore queries specially using RATE function. For example, When I tried to write queries about network ...