How do we know how long hermit crabs live in the wild?
Hermit crabs increase in size over time and this is used to provide a minimum estimate for their age1.

You may also find this article interesting.



Reference:
SantAnna, Bruno Sampaio, Christofoletti, Ronaldo Adriano, Zangrande, Cilene Mariane, &amp; Reigada, Alvaro Luis Diogo. (2008). Growth of the hermit crab Clibanarius vittatus (Bosc, 1802) (Crustacea, Anomura, Diogenidae) at São Vicente, São Paulo, Brazil. Brazilian Archives of Biology and Technology, 51(3), 547-550. https://dx.doi.org/10.1590/S1516-89132008000300014