If you're asking "What's the approximate lifespan of a battery" then the answer should be something like "Around 4 years depending on use".
However, if you're asking "How long does your bike keep charge if left unused" then the answer should be something like "Almost forever". Unless the power is disappearing somehwere. A tracker for example.

You could quite easily figure out how long the batter should last. The battery is classified by capacity "Ah", "Ampere hours", your tracker should have a sticker on it explaining how many Ah it draws. To simplify, if the battery is 11Ah, and your tracker would draw a hefty 1Ah, then it'd last approx 11h before it would be drained. If your tracker doesn't have this sticker, you can measure it with a multimeter.
BUT!
CrazyCaz's F800GS kept losing charge, but mine was fine.

So I started investigating. It turns out that her bike shows 0.3V at the accessory socket when the power is turned off, whilst my bike shows a flat 0V.

It's going into the garage for an investigation on Wednesday.
Might be worth a check!
PS, I don't use my car regularly so I bought a cheap solar panel to keep it topped up, but it turns out that the solar panel charge confuses the hell out of the electronics of the car resulting in a myriad of error codes.