The differential cross section and charge asymmetry for inclusive W boson production at s=13 TeV is measured for the two transverse polarization states as a function of the W boson absolute rapidity. The measurement uses events in which a W boson decays to a neutrino and either a muon or an electron. The data sample of proton-proton collisions recorded with the CMS detector at the LHC in 2016 corresponds to an integrated luminosity of 35.9 fb-1. The differential cross section and its value normalized to the total inclusive W boson production cross section are measured over the rapidity range |yW|<2.5. In addition to the total fiducial cross section, the W boson double-differential cross section, d2σ/dpTd|η|, and the charge asymmetry are measured as functions of the charged lepton transverse momentum and pseudorapidity. The precision of these measurements is used to constrain the parton distribution functions of the proton using the next-to-leading order NNPDF3.0 set.