The stiffness maximization of elastic straight Euler-Bernoulli beams under the action of linearly distributed loads is addressed. The goal is achieved by minimizing the average compliance, which is given by the value of internal elastic energy distributed over the length of the beam. Studies in the literature suggest considering this approach since it provides, unlike the minimization of the maximum deflection, a constant bending stress behavior along the beam axis. An isoperimetric constraint on the material volume is also considered and optimal solutions are derived by means of calculus of variations. Three types of boundary conditions are discussed, namely cantilever, simply supported and guided-simply supported beams. Introducing a well known relation between the cross sectional area and moment of inertia, closed-form solutions for several cross sections commonly used in engineering are derived. Finally, a sensitivity analysis with respect to the load parameters is addressed within a numerical example. (c) 2021 Elsevier Ltd. All rights reserved.