Context. The hydrogen ionisation degree deviates substantially from statistical equilibrium under the conditions of the solar chromosphere. A realistic description of this atmospheric layer thus must account for time-dependent non-equilibrium effects. Aims. Advancing the realism of numerical simulations of the solar chromosphere by improved numerical treatment of the relevant physics will provide more realistic models that are essential for interpretation of existing and future observations. Methods. An approximate method for solving the rate equations for the hydrogen populations was extended and implemented in the three-dimensional radiation (magneto-)hydrodynamics code CO5BOLD. The method is based on a model atom with six energy levels and fixed radiative rates. It has been tested extensively in one-dimensional simulations. The extended method has been used to create a three-dimensional model that extends from the upper convection zone to the chromosphere. Results. The ionisation degree of hydrogen in our time-dependent simulation is comparable to the corresponding equilibrium value up to 500 km above optical depth unity. Above this height, the non-equilibrium ionisation degree is fairly constant over time and space, and tends to be at a value set by hot propagating shock waves. The hydrogen level populations and electron density are much more constant than the corresponding values for statistical equilibrium, too. In contrast, the equilibrium ionisation degree varies by more than 20 orders of magnitude between hot, shocked regions and cool, non-shocked regions. Conclusions. The simulation shows for the first time in 3D that the chromospheric hydrogen ionisation degree and electron density cannot be calculated in equilibrium. Our simulation can provide realistic values of those quantities for detailed radiative transfer computations