Natural populations of the spider crab Maja brachydactyla constitute a fishery resource of great economic importance in many countries. As in the rest of eubrachyurans, the females of this species have ventral-type seminal receptacles where they store sperm from copulations. Sperm can be stored in these structures for months and even years before egg fertilisation, with the consequent degradation of the sperm cells during the time. In this work, we analyse the viability and the possible genetic damage in sperm accumulated in the seminal receptacles of M. brachydactyla females as a function of the storage time (from 0 to 14 months) using the comet assay technique. On one hand, we developed an algorithm for comet image analysis that improves the comet segmentation compared with the free software Open comet v1.3.1 (97% vs. 76% of detection). In addition, our software allows the manual modification of the contours wrongly delimited via the automatic tool. On the other hand, our data show a sharp decline in sperm viability and DNA integrity in the first four months of storage, which could lead to a decrease in the fecundity rate and/or viability of the embryos or larvae from the second and third clutches of the annual cycle if the repair capacity in these gametic cells is low.