A method to calculate NMR J-coupling constants from first principles in extended systems is presented. It is based on density functional theory and is formulated within a planewave-pseudopotential framework. The all-electron properties are recovered using the projector augmented wave approach. The method is validated by comparison with existing quantum chemical calculations of solution-state systems and with experimental data. The approach has been applied to verify measured J-coupling in a silicophosphate structure, Si5O(PO4)6