The invention is applicable to the field of jet printing, and discloses a jet printing height measuring and calculating method, which comprises the following steps of: emitting polychromatic light to a measured base material and a
nozzle surface from one side, far away from a
nozzle, of the measured base material by using a spectral
confocal sensor, and receiving a first optical
signal reflected from one side, close to the
nozzle, of the measured base material and a second optical
signal reflected by the nozzle; determining a first focusing
wavelength focused on one side, close to the nozzle, of the measured base material, a second focusing
wavelength focused on the nozzle and a nozzle incident angle according to the two optical signals, and substituting the first focusing
wavelength, the second focusing wavelength and the nozzle incident angle into a pre-constructed
refractive index calculation function to calculate the
refractive index; substituting the dual wavelengths into a pre-constructed initial thickness calculation function and an
error correction model to obtain a theoretical height value and an error compensation amount; if the inclination angle of the measured base material is not 0 degree, the actual height value from the measured base material to the nozzle is calculated according to a pre-constructed first real thickness calculation function, and the method is used for achieving online high-precision monitoring of the jet printing height.