We present a master formula describing the neutrinoless-double-beta decay (0νββ) rate induced by lepton-number-violating (LNV) operators up to dimension nine in the Standard Model Effective Field Theory. We provide an end-to-end framework connecting the possibly very high LNV scale to the nuclear scale, through a chain of effective field theories. Starting at the electroweak scale, we integrate out the heavy Standard Model degrees of freedom and we match to an SU(3)c⊗U(1)em effective theory. After evolving the resulting effective Lagrangian to the QCD scale, we use chiral perturbation theory to derive the lepton-number-violating chiral Lagrangian. The chiral Lagrangian is used to derive the two-nucleon 0νββ transition operators to leading order in the chiral power counting. Based on renormalization arguments we show that in various cases short-range two-nucleon operators need to be enhanced to leading order. We show that all required nuclear matrix elements can be taken from existing calculations. Our final result is a master formula that describes the 0νββ rate in terms of phase-space factors, nuclear matrix elements, hadronic low-energy constants, QCD evolution factors, and high-energy LNV Wilson coefficients, including all the interference terms. Our master formula can be easily matched to any model where LNV originates at energy scales above the electroweak scale. As an explicit example, we match our formula to the minimal left-right-symmetric model in which contributions of operators of different dimension compete, and we discuss the resulting phenomenology.