Calcylator
Performance

Requests per second:
requests ÷ seconds

Turn log counts into requests per second, plan for peak rather than average traffic, and estimate concurrent requests.

Calcylator Editorial Team

Updated · 5 min read

How to calculate requests per second

Requests per second (RPS) is the number of requests divided by the time in seconds. If your server logged 90,000 requests in one hour, that is 90,000 ÷ 3,600 = 25 requests per second. Convert the time window to seconds before you divide.

The number tells you how busy your service is. Developers use it to compare load against what a server, database or API can handle, and to set limits so that a traffic spike does not take the system down.

The RPS formula and an example

Requests per second =RPS = requests ÷ seconds
requests:
number of requests counted
seconds:
length of the counting window in seconds, above zero
The Calcylator calculator shows the result to three decimal places in req/s.
  • Requests

    12,600

  • Duration

    60 s

  • Division

    12,600 ÷ 60

Requests per second

210 req/s

Use the same window for every comparison, for example one minute.

Peak load, not the average, sets the capacity

A day of 2,160,000 requests averages 25 req/s, but real traffic is lumpy. A shop's site may see much more at 8 pm than at 4 am, and a sale or a message to your mailing list can multiply it for a few minutes.

Count the busiest minute in your logs, divide by 60, and size for that. If peak traffic is four times the 25 req/s average, plan for 100 req/s. A server that copes with the average but not the peak will fail exactly when it matters most.

Converting counts to requests per second
RequestsWindowreq/s
90,0001 hour25
12,6001 minute210
5,400,0001 day (86,400 s)62.5
1,8001 minute30

From RPS to servers and concurrent requests

If one server can safely handle 30 req/s, a peak of 100 req/s needs 100 ÷ 30 = 3.33, so you round up to 4 servers. The 30 is only an example; measure your own with a load test, since it depends on your code and hardware.

Concurrency follows from a simple relation: requests in progress at once ≈ RPS × average response time in seconds. At 250 req/s with a 0.2 s response time, about 50 requests are in flight at any moment.

Add some headroom on top. Running a server near its limit leaves no room for a sudden surge, a slow database query or a failed machine, so many teams aim to stay well below the tested maximum.

Reading RPS from real logs

Most web servers and load balancers write one log line per request, so counting lines in a time window gives the request total. Divide that by the window length in seconds to get RPS, then repeat for several windows to see how traffic changes through the day.

Monitoring dashboards usually plot this for you, but doing the sum by hand is a good check on what a chart is showing. If a graph says 25 req/s and your log shows 90,000 requests in an hour, the two agree.

Common mistakes with requests per second

  • Dividing by minutes or hours instead of seconds.
  • Planning for the average and ignoring peaks.
  • Counting page views instead of requests. One page often triggers many requests for images, scripts and data.
  • Using one test result for every endpoint. Heavy routes cost far more than light ones.
  • Forgetting that bots and health checks add to the count.

Common questions

How do I calculate requests per second?

Divide the number of requests by the time window in seconds. For 90,000 requests in one hour, divide by 3,600 seconds to get 25 requests per second. Convert minutes or hours into seconds first.

How do I convert requests per minute to requests per second?

Divide by 60. A rate of 12,600 requests per minute is 12,600 ÷ 60 = 210 requests per second. To go the other way, multiply requests per second by 60.

Should I plan for average or peak requests per second?

Plan for peak. Average traffic hides the busiest periods, when servers fail. Find the busiest minute in your logs, divide by 60, and add headroom. A peak of 4 times the average needs 4 times the capacity.

How many servers do I need for 100 requests per second?

Divide the peak load by what one server can safely handle. If one server handles 30 requests per second, 100 ÷ 30 is 3.33, so you need 4. Measure your own limit with a load test.

Was this guide helpful?

Continue reading

View all blogs