The mass of the top quark is measured using a sample of tt¯ events collected by the CMS detector using proton-proton collisions at s=13 TeV at the CERN LHC. Events are selected with one isolated muon or electron and at least four jets from data corresponding to an integrated luminosity of 35.9 fb-1 . For each event the mass is reconstructed from a kinematic fit of the decay products to a tt¯ hypothesis. Using the ideogram method, the top quark mass is determined simultaneously with an overall jet energy scale factor (JSF), constrained by the mass of the W boson in qq¯' decays. The measurement is calibrated on samples simulated at next-to-leading order matched to a leading-order parton shower. The top quark mass is found to be 172.25±0.08(stat+JSF)±0.62(syst)GeV . The dependence of this result on the kinematic properties of the event is studied and compared to predictions of different models of tt¯ production, and no indications of a bias in the measurements are observed.