Direct detection of low-frequency gravitational waves (GWs, Hz) is the main goal of pulsar timing array (PTA) projects. One of the main targets for the PTAs is to measure the stochastic background of gravitational waves (GWB) whose characteristic strain is expected to approximately follow a power-law of the form , where f is the GW frequency. In this paper we use the current data from the European PTA to determine an upper limit on the GWB amplitude A as a function of the unknown spectral slope α with a Bayesian algorithm, by modelling the GWB as a random Gaussian process. For the case α=−2/3, which is expected if the GWB is produced by supermassive black hole binaries, we obtain a 95 per cent confidence upper limit on A of 6 × 10−15, which is 1.8 times lower than the 95 per cent confidence GWB limit obtained by the Parkes PTA in 2006. Our approach to the data analysis incorporates the multitelescope nature of the European PTA and thus can serve as a useful template for future intercontinental PTA collaborations.