Measurements of the inclusive and differential production cross sections for the Higgs boson in the diphoton decay channel are performed using the data set of proton-proton collisions at s=13 TeV collected by the CMS experiment at the LHC in 2016 and corresponding to an integrated luminosity of 35.9 fb−1. The cross sections are measured in a fiducial phase space defined by a set of requirements on the isolation and kinematic variables of the photons. Differential cross sections are measured as functions of the kinematic properties of the diphoton system and the event. A subset of the measurements is performed in regions of the fiducial phase space, where relative contributions of specific Higgs boson production mechanisms are enhanced. The total cross section in the chosen fiducial phase space is measured to be 84 ± 11 (stat) ± 7 (syst) fb = 84 ± 13 fb, to be compared with a theoretical prediction of 73 ± 4 fb. All measurements are found to be in agreement with the theoretical predictions for the standard model Higgs boson with a mass of 125.09 GeV within the experimental and theoretical uncertainties.[Figure not available: see fulltext.].