They both have the exact same longevity, it's just that pelletized lime takes a lot longer to dissolve into the soil than ag lime. If you want to raise your PH as fast as possible, use Ag lime. If you want it to be easier to spread, use pelletized. The longevity of the lime depends on the type...