High-precision measurements by the ATLAS Collaboration are presented of inclusive W+→ ℓ+ν, W-→ ℓ-ν¯ and Z/ γ∗→ ℓℓ (ℓ= e, μ) Drell–Yan production cross sections at the LHC. The data were collected in proton–proton collisions at s=7TeV with an integrated luminosity of 4.6fb-1. Differential W+ and W- cross sections are measured in a lepton pseudorapidity range | ηℓ| < 2.5. Differential Z/ γ∗ cross sections are measured as a function of the absolute dilepton rapidity, for | yℓ ℓ| < 3.6 , for three intervals of dilepton mass, mℓ ℓ, extending from 46 to 150GeV. The integrated and differential electron- and muon-channel cross sections are combined and compared to theoretical predictions using recent sets of parton distribution functions. The data, together with the final inclusive e±p scattering cross-section data from H1 and ZEUS, are interpreted in a next-to-next-to-leading-order QCD analysis, and a new set of parton distribution functions, ATLAS-epWZ16, is obtained. The ratio of strange-to-light sea-quark densities in the proton is determined more accurately than in previous determinations based on collider data only, and is established to be close to unity in the sensitivity range of the data. A new measurement of the CKM matrix element | Vc s| is also provided.