  A theory for the reliable prediction of the EPR g-tensor for paramagnetic
defects in solids is presented. It is based on density functional theory and on
the gauge including projector augmented wave (GIPAW) approach to the
calculation of all-electron magnetic response. The method is validated by
comparison with existing quantum chemical and experimental data for a selection
of diatomic radicals. We thenperform the first prediction of EPR ${\rm g}
$-tensors in the solid state and find the results to be in excellent agreement
with experiment for the $E'_1$ and substitutional P defect centers in quartz.
