How to find BPM from a loop's length
Convert the loop's notated length into quarter-note beats, multiply by 60 and divide by its duration in seconds. Once the original BPM is known, the target-to-original BPM ratio gives the required playback-speed or time-stretch change.
BPM = bars × meter numerator × (4 ÷ denominator) × 60 ÷ duration