Depends on chemistry, temp and state of charge.
For example, a li-ion (inc limn and lipo) battery can be stored at 40% charge (3.85v per cell) @ 1c and it will only lose 2% of it's capacity over the year. However store it at 25c and it will 4% of it's charge. Storing it at full charge accelerates the loss further - a whopping 20% over the year for a fully charged battery stored at 25c.
So, if you're not using you're li-ion battery charge it to 40% and keep it somewhere cool.
lifpo4 is a bit better as resisting capacity loss but following the same rules wont do any harm.
Now the issue comes when you have a Battery Murdering System fitted (or BMS for short). Some BMS's don't disconnect after a period of storage so they can slowly discharge a battery - taking a li-ion battery to below 3.5v per cell damages them and reduces thier capacity and increases thier imepdance (i.e. more voltage sag). Take a li-ion below 2.5v and you have basically a junk battery.