How to determine thread size of a nut or bolt?

Is there any way other than guesswork or trial and error to determine the specific thread size of an unmarked nut or bolt?

Thanks.
11 answers 11