We present a general "fit-free" method for measuring the equation of state (EoS) of a scale-invariant gas. This method, which is inspired from the procedure introduced by Ku et al. [Science 335, 563 (2012)] for the unitary three-dimensional Fermi gas, provides a general formalism which can be readily applied to any quantum gas in a known trapping potential, in the frame of the local density app...