# Calculate peak concurrent users on a website

I am looking at setting up some website load testing scripts and need some help in finding a formula to estimate how many concurrent users are browsing a website at peak times, based on common metrics such as visits, average page views per visit, and average visit duration.

For example:

Peak visitors per hour: 1,000

Average page views per visitor: 3

Average time per visit: 5 minutes

Should I be considering at any other stats? Thanks in advance!

• I asked a very similar question a while back. Check out sqa.stackexchange.com/questions/710/… See if that helps you. – TristaanOgre Jul 28 '11 at 12:34
• Personally, I would parse the logs (assuming you're keeping them) and find the minute-sliding-window of time that had the highest number of hits in that minute. Then I'd add 20% or so. You can break it down into 5 sec or 10 sec window or whatever you feel is appropriate, but going off of real world data is always best. What if those 1000 vistors in that hour all were hitting the site at 9:17 AM because the new deal-of-the-day was posted at 9:16 and they just got the facebook update or something? That's the kind of scenario your load testing has to handle. – corsiKa Jul 29 '11 at 22:10

If you have an average visit length of 5 minutes, a single user could create 60 min / 5 min = 12 visits per hour. To get to the target number of 1000 visits/visitors per hour, you need 1000 visits / 12 visits per user = 84 concurrent user.

In total you will have 1000 visits and 3000 page views.

Just as a side note: 5 min visit length and only 3 page views seems to be a little... small. This means, the user has a think time of about 100 seconds. Quite some time. What kind of site is that?

Try this formula:

Users spending on the page about 15 min, and the site is generally accessed between 9AM EST and 6PM PST (15 hours). You can calculated concurrent users with the following formula.

(total monthly users)/(30 days a month * 15 hours a day * 4 {note, 60min/15min per user} = daily average concurrent user load.

Example:
250 visits per 1 day
users spend about 15 min on the page
site is accesed mostly about 8 hour a day

(total daily users)/(1 day * 8 hour a day * 4 {note, 60min/15min per user}

250/(1*8*4) = 7.8 concurrent user (we can assume 8 concurrent users)

So if those 8 users will be login every 15 minutes it will give you about 250 users/visits for a day.