Deflection usually governs before strength does
A beam can be strong enough and still sag too much for finishes, glazing or machinery. Serviceability limits like L/360 for floors and L/240 for roofs exist for that reason.
Deflection scales with the span to the fourth power under uniform load. Doubling a span makes it sixteen times worse, which is why depth (and so I) matters more than material.
This tool covers the four textbook cases. Continuous spans, partial loads and composite action need a full analysis.