They are both in the .40 caliber category. As is the
M1911 pistol - Wikipedia which is standard military issue. I own a 1911 myself. Also specifically .40 S&W is commonly used by police departments across the nation.
As I said before there are lots of bullets not commonly used. But the vast majority of calibers is used by both civilians and military.
Here is a good example. I have a .45 cal 1911. It's my everyday conceal carry. I carry it 100% legally as a licensed civilian. But what is not legal (at least what is not easily legal to own) is a
Thompson submachine gun - Wikipedia or more commonly known as the Tommy Gun. It uses the same bullets as my 1911, the .45 acp. But because it is fully automatic it is not for civilian use even though it was used in WW2 by the U.S. military.