In addition to the thread form, the pitch may give a clue, as BSF or UNF
Unfortunately, BSW and UNC tend to have same pitches for the same size, but 1/4 BSF is 26 tpi where 1/4 UNF is 28.
5/16 3/8
BSW BSF UNC UNF BSW BSF UNC UNF
18 22 18 24 16 20 16 24
Although a good guide, don’t be too fixated on the hexagon size. Sometimes you can come across A/F headed Whit form fasteners; fortunately only very occasionally! I met a 5/8 A/F bolt with a 3/8 BSF thread!
Howard