The knowledge of such beam parameters as beam diameter, divergence angle, beam propagation factor M2 is very useful for many laser applications. Thus it is necessary to know these parameters of a laser beam while doing some laser experiments or for characterization a laser beam of industrial lasers. We developed and constructed a low-cost M2 -sensor allowing to measure the main parameters of a laser beam. The algorithm of the measurements is based on double and multiple beam diameter measurements. Beam diameter is defined as the second moment of the intensity distribution function of the beam at some cross-section. The software of M2 -sensor includes options for evaluation of short-term and long-term laser power stability. It is also possible to do Gaussian and flat-top fit to the beam intensity that is used to evaluate how close the beam is to TEM00 mode or to uniform beam.