The recent researches in non equilibrium and far from equilibrium systems have been proved to be useful for their applications in different disciplines and many subjects. A general principle to approach all these phenomena with a unique method of analysis is required in science and engineering: a variational principle would have this fundamental role. Here, the Gouy-Stodola theorem is proposed to be this general variational principle, both proving that it satisfies the above requirements and relating it to a statistical results on entropy production.