Diagonalize a form over the rationals to diag[p^a·A, p^b·B, ...], where all the entries are integers and A, B, ... are relatively prime to p. Then the p-signature of the form (for p!=-1, 2) is p^a + p^b + ... + 4k (mod 8), where k is the number of antisquares. For p = - 1, the p-signature is Sylvester's signature.