The exact solution of the one-dimensional Hubbard model, both attractive and repulsive, is investigated in dependence of electron concentration n over a wide range of interaction strength U and magnetic field h. The magnetic phase diagram and the ground-state properties, including the total energy, the number of double occupied sites and the kinetic energy are studied for −∞ < U < ∞ and 0 ≤ n ≤ 1.