Numerous circumbinary planets have been discovered in surveys of transiting planets. Often, these planets are found to orbit near to the zone of dynamical instability, close to the central binary. The existence of these planets has been explained by hydrodynamical simulations that show that migrating circumbinary planets, embedded in circumbinary discs, halt at the central cavity that is formed by the central binary. Transit surveys are naturally most sensitive to ?nding circumbinary planets with the shortest orbital periods. The future promise of detecting longer period systems using radialvelocity searches, combined with the anticipated detection of numerous circumbinary planets by ESA’s PLATO mission, points to the need to model and understand the formation and evolution of circumbinary planets in a more general sense than has been considered before. With this goal in mind, we present a newly developed global model of circumbinary planet formation that is based on the mercury6 symplectic N-body integrator, combined with a model for the circumbinary disc and prescriptions for a range oaf processes involved in planet formation such as pebble accretion, gas accretion and migration. Our results show that under reasonable assumptions, the pebble accretion scenario can produce circumbinary systems that are similar to those that have been observed, and in particular it is able to produce planets akin to Kepler-16b, Kepler-34b and BEBOP-1c. Comparing our results to other systems, we ?nd that our models can also adequately reproduce such systems, including multi-planet systems. Resonances between neighbouring planets are frequently obtained, whilst ejections of planets by the central binary acts as an e?ective source of free ?oating planets.