A parametrization scheme for the density-functional based tight-binding (DFTB) method that covers the periodic table is presented. A two-stage semiautomatic parametrization scheme has been developed. First, Kohn-Sham energies and band structure curvatures of real and fictitious homoatomic crystal structures are used as reference data to obtain the electronic part of the method. A confinement potential is used to tighten the Kohn-Sham orbitals, which includes two free parameters that are used to optimize the performance of the method. In the second step, the double counting terms to obtain total energy and gradients are obtained using the same philosophy, that is, to compute these terms using a confined electron density. This time, structural data of molecules and solids and relative energies are used as reference data. The method is tested on more than 100 systems and shows excellent overall performance.