With this online calculator you can calculate the bolt diameter under shear load.
Formula:
d = √ (4*S/(π*i*z*τa))
d - bolt diameter, mm
S - force, N
i - number of cut planes, pcs
z - number of bolts, pcs
τa - bolt material yield strength, MPa
A bolted connection is a detachable fastening threaded connection for fastening two or more parts with bolts.