The WZ production cross section is measured in proton-proton collisions at a centre-of-mass energy = 13 TeV using data collected with the CMS detector, corresponding to an integrated luminosity of 35.9 fb(-1). The inclusive cross section is measured to be sigma(tot)(ppWZ)=48.0) pb, resulting in a total uncertainty of -2.78/+2.98 pb. Fiducial cross section and ratios of charge-dependent cross section measurements are provided. Differential cross section measurements are also presented with respect to three variables: the Z boson transverse momentum p(T), the leading jet p(T), and the M(WZ) variable, defined as the invariant mass of the system composed of the three leptons and the missing transverse momentum. Differential measurements with respect to the W boson p(T), separated by charge, are also shown. Results are consistent with standard model predictions, favouring next-to-next-to-leading-order predictions over those at next-to-leading order. Constraints on anomalous triple gauge couplings are derived via a binned maximum likelihood fit to the M(WZ) variable.