Loop Length Calculator