Length by use case
Homepage hero or paid social: 60 seconds, with a hook in the first 3 seconds. Trade show loop: 90 seconds, designed to make sense without sound. Sales follow-up case study: 2 to 3 minutes, more detail acceptable since the viewer self-selected. Brand film for the website "About" page: 3 to 4 minutes. Internal training video: as long as it needs to be, since the viewer has to watch it.
Why "as long as it needs to be" is bad advice
It's the answer agencies give when they don't want to defend a length. Real audiences abandon corporate video aggressively. YouTube and Wistia data both put the 50% drop-off point around 3 minutes for B2B content, regardless of subject matter. If your video is 5 minutes, half the audience never sees the second half. Cut accordingly.
Short isn't always better
The flip side: a 30-second video that tries to cover the same story as a 2-minute version usually fails. The story takes the time it takes. The right move is to pick the right format for the audience, not to compress every video into the shortest possible runtime.