The present paper discusses about optimal shape solution for a non-prismatic planar beam. The proposed model is based on the standard Timoshenko kinematics hypothesis (i.e., planar cross-section remains planar in consequence of a deformation, but it is able to rotate with respect to the beam center-line). The analytical solution for this type of beam is thus used to obtain deformations and stresses of the beam, under different constraints, when load is assumed as the sum of a generic external variable vertical one and the self-weight. The solution is obtained by numerical integration of the beam equation and constraints are posed both on deflection and maximum stress under the hypothesis of an ideal material. The section variability is, thus, described assuming a rectangular cross section with constant base and variable height which can be described in general with a trigonometric series. Other types of empty functions could also be analyzed in order to find the best strategy to get the optimal solution. Optimization is thus performed by minimizing the beam volume considering the effects of non-prismatic geometry on the beam behavior. Finally, several analytical and numerical solutions are compared with results existing in literature, evaluating the solutions’ sensibility to some key parameters like beam span, material density, maximum allowable stress and load distribution. In conclusion, the study finds a critical threshold in terms of emptying function beyond which it is not possible to neglect the arch effect and the curvature of the actual axis for every different case study described in this work. In order to achieve this goal, the relevance of beam span, emptying function level and maximum allowable stress are investigated.