Recently, considerable progress has been made in understanding finite-size scaling in equilibrium systems. Here, we study finite-size scaling in nonequilibrium systems at the instance of directed percolation (DP), which has become the paradigm of nonequilibrium phase transitions into absorbing states, above, at, and below the upper critical dimension. We investigate the finite-size scaling behavior of DP analytically and numerically by considering its steady state generated by a homogeneous constant external source on a d-dimensional hypercube of finite edge length L with periodic boundary conditions near the bulk critical point. In particular, we study the order parameter and its higher moments using renormalized field theory. We derive finite-size scaling forms of the moments in a one-loop calculation. Moreover, we introduce and calculate a ratio of the order parameter moments that plays a similar role in the analysis of finite size scaling in absorbing nonequilibrium processes as the famous Binder cumulant in equilibrium systems and that, in particular, provides a signature of the DP universality class. To complement our analytical work, we perform Monte Carlo simulations which confirm our analytical results.