It’s easy to only think about dropper posts in the amount of drop that’s available, it’s how they’re usually specified and often named. As a general rule you’ll want as long a drop as you can fit in your bike. But the amount of drop is only part of the equation as you need to account for the collar height and seat post head too.
There’s usually only a little variation between manufacturers in collar (~28mm) and seat post head height but it’s important to check as these things can `make a difference.
Your starting point is the length of your current seatpost, this is your “exposed seatpost” length. A dropper’s “exposed seatpost” is the length of the drop plus collar height plus clamp height must be less than your current “exposed seat post”. Or:
Current seat post  >  drop length + collar height + clamp height
Some manufactures list these dimensions clearly, others give some but not all, some have fancy online calculators and others don’t give any. If in doubt, check before you buy.