The production rates of prompt and non-prompt [Formula: see text] and [Formula: see text] mesons in their dimuon decay modes are measured using 2.1 and 11.4 fb[Formula: see text] of data collected with the ATLAS experiment at the Large Hadron Collider, in proton-proton collisions at [Formula: see text] and 8 respectively. Production cross-sections for prompt as well as non-prompt sources, ratios of [Formula: see text] to [Formula: see text] production, and the fractions of non-prompt production for [Formula: see text] and [Formula: see text] are measured as a function of meson transverse momentum and rapidity. The measurements are compared to theoretical predictions.