This paper analyses the effects of the size of government on economic growth in a stochastic endogenous growth model involving the supply-side effect and demand-side effect produced by government spending. We show that a rise in the government spending affects economic growth through three channels, including the crowding-out effect, the spin-off effect and the resource mobilisation effect. We demonstrate that there exists an optimal size of government that maximises the economic growth rate.