It's not quite as simple as that.
@drinkingbird is right - the latest AC models and all of the AX models shouldn't have troubles (they're all capable of 500Mbps+)
Users or client devices? users lately can have more than one device each - phone, tablet, watch, laptop...
40 users with 2 devices is 80...40 users with 3 devices is 120...
So is it 40 IP addresses? or more? DHCP address space is the (my) first concern
Next thing to consider: Is your ISP package speed up to the task? (
@L&LD beat me to this)
video chats like skype make for a lot of trafiic on a LAN even at 720p resolution (3-5Mbps per instance, or more - 40 users at 3-5Mbps or more is 100+Mbps...80 devices can require 200+Mbps)
YazDHCP and QoS are things for you to look into to possibly help mitigate issues, but ... are some of the users wired rather than wirelessly connected to the router? Wireless speeds can degrade the more devices connected to a router.
And then: does the router need some help to buffer all of the traffic? Have you set up a swap file on the router to help it move all that data through the processors?