We report on the derivation of analytical formulas for the lineshape of Fano resonances in plasmonic nanostructures as a function of their electromagnetic response. Contrary to the original work of Fano, the formalism proposed here includes losses in the materials composing the system. As a result, a more general formula is obtained for the response of the system and general conclusions for the determination of the resonance parameters are drawn, in particular on its width and asymmetry. The insights into the physical understanding of Fano resonances gained this way will be of great interest for the design of plasmonic sensing platforms and metamaterials.