Determine the number of beats per minute (e.g. 96BPM).

Determine the number of measures per minute by dividing the BPM by the number of beats per measure (e.g. 96/4 = 24 measures per minute).

Then take the total number of bars in the song and divide it by the number of measures per minute. E.g. 104 measures/24 measures per minute = 4.5m for the total time of the song.