The double differential cross sections of the Drell-Yan lepton pair (ℓ+ℓ-, dielectron or dimuon) production are measured as functions of the invariant mass mℓℓ, transverse momentum pT(ℓℓ), and φη∗. The φη∗ observable, derived from angular measurements of the leptons and highly correlated with pT(ℓℓ), is used to probe the low-pT(ℓℓ) region in a complementary way. Dilepton masses up to 1TeV are investigated. Additionally, a measurement is performed requiring at least one jet in the final state. To benefit from partial cancellation of the systematic uncertainty, the ratios of the differential cross sections for various mℓℓ ranges to those in the Z mass peak interval are presented. The collected data correspond to an integrated luminosity of 36.3fb-1 of proton-proton collisions recorded with the CMS detector at the LHC at a centre-of-mass energy of 13TeV. Measurements are compared with predictions based on perturbative quantum chromodynamics, including soft-gluon resummation.