Basic engineering standard for steel thread to steel thread is 1 to 1. Half inch (1/2") bolt/stud to half inch (1/2") nut you have to have 1/2" of thread engagement MINIMUM

I like Moparx's 1 and 1/2 times the diameter also.

1 to 1 is the minimum for steel bolt/stud to steel thread (nut)

2 to 1 for steel bolt into aluminum thread.

3 to 1 for steel into magnesium thread.