Virial relations are traditionally considered as providing the diamagnetic parameter, poloidal beta [Formula: see text], and internal inductance [Formula: see text] through the integrals determined by the plasma shape and poloidal magnetic field at the plasma–vacuum interface. This gives rise to discussions of their potential applications for diagnostic purposes. Recently, this concept was analyzed in the numerical study of Bongard et al. [Phys. Plasmas 23, 072508 (2016)]. Here, we analytically calculate three main virial integrals (traditionally denoted as [Formula: see text], [Formula: see text], and [Formula: see text]) for the plasma with elliptical cross section. The results are expressed through the plasma elongation, its radial derivative, and a similar derivative [Formula: see text] of the Shafranov shift, all taken at the plasma boundary. The geometry of magnetic surfaces inside is not constrained, which guaranties the applicability of the results in a wide area. It is shown that [Formula: see text] must be a constant, [Formula: see text] weakly depends on [Formula: see text], and only [Formula: see text] is a sensitive function of the plasma state through [Formula: see text]. This makes [Formula: see text] the quantity most suitable for diagnostics, while independence of [Formula: see text] on the plasma shape, [Formula: see text], and [Formula: see text] can be good for calibrations. The difficulties of inferring [Formula: see text] from the measured [Formula: see text] are now shown explicitly.