Is there a way to determine correct chain length?

rumbataz Posts: 796
edited December 2015 in Workshop
So here's a hypothetical situation: the chain on your bike has been put on my someone who found a chain lying around and it may or may not be of the correct length. It's now worn so needs to be replaced.

You buy a new chain but don't want to use the old one as guidance for the correct length.

How do you determine what the correct length is for a chain?