When comparing the new chain to the old chain, if the old chain was originally the correct length you should make the new chain have the same number of links as the old chain, not the same length, since the old chain has been stretched.
Having said that, if you are going to do your own chain replacements you need to know all of the acceptable methods of sizing the chain. When I install a new chain I check the big to big combination and the small to small combination and cut the chain so that the rear derailleur does not reach its forward or rearward limit. This way if I accidentally shift into the big to big combination there will be no damage to the rear derailleur. And if I accidentally shift into the small to small combination the rear derailleur will still hold some tension on the lower run of chain and there will be no slack chain.