Lay your chainsaw flat. Get a tape measure. Start at the point where the bar meets the saw body. Run the tape to the very end of the bar. Look at the inches. Round up to the next even number, like 16 or 18. That is your bar length.
This number tells you the size of your saw. You need this number to pick a new chain. The right chain will fit your bar. A wrong chain will not work. It is that simple.