We report on a numerical study of the aspect-ratio dependency of Rayleigh-Bénard convection, using direct numerical simulations. The investigated domains have equal height and width while the aspect ratio Γ of depth per height is varied between 1/10 and 1. The Rayleigh numbers \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra for this study variate between 105 and 109, while the Prandtl number is \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Pr}} = 0.786$\end{document}Pr=0.786. The main focus of the study concerns the dependency of the Nusselt number \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Nu}}$\end{document}Nu and the Reynolds number \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Re}}$\end{document}Re on \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra and Γ. It turns out that due to Γ, differences to the cubic case (i.e., Γ = 1) in \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Nu}}$\end{document}Nu of up to 55% and in \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Re}}$\end{document}Re of up to 97% occur, which decrease for increasing \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra. In particular for small Γ sudden drops in the \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra-scaling of \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Nu}}$\end{document}Nu and \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Re}}$\end{document}Re appear for \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}\approx 10^6$\end{document}Ra≈106. Further analysis reveals that these correspond to the onset of unsteady motion accompanied by changes in the global flow structure. The latter is investigated by statistical analysis of the heat flux distribution on the bottom and top plates and a decomposition of the instantaneous flow fields into two-dimensional modes. For \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra slightly above the onset of unsteady motion (i.e., \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}\approx 10^6$\end{document}Ra≈106) for all considered Γ ⩽ 1/3 a four-roll structure is present, which corresponds to thermal plumes moving vertically through the domain's center. For \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}\ge 10^7$\end{document}Ra≥107, also for small Γ, a single-roll structure is dominant, in agreement with two-dimensional simulations and experiments at larger \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Ra}}$\end{document}Ra and \documentclass[12pt]{minimal}\begin{document}$\mbox{\textit {Pr}}$\end{document}Pr.