Is there a formula for connection pool size?

I develop webservices with event driven architecture and I was wondering if there is a formula to count the optimal connection pool size? Even if there isn’t it would be a big help to know what it depends on or see real life measurements to know at least the order of magnitude. I tried to find scientific articles in the topic without success, but maybe I used the wrong keywords.