When to charge your phone

What's the best time to charge your phone? A new phone I purchased loses battery anywhere from 5% a day to 50% a day without use. It drains more if it is used. Other phones I own vary. Some hold the charge well while others don't. I usually get an indication to recharge when the battery is 15% but if I have only say 20% charge left and I have to drive long distance for the entire day, then I could be left without a working phone. So what's the best time to charge? Or does it not matter for the new phones? I have read that if you charge when you have like 40% remaining, it damages the battery.

I just charge whenever it is convenient. Some over night. These days batteries are pretty resilient.

Is leaving the charger connected to the phone and power too long hurt the battery? i.e. leaving it charging for over 24 hours.

Speaking generally of similar batteries..... if the charging system is not "smart" enough to turn of the charge current, it's a bad idea to leave batteries on a charger past a "full charge". Overcharging will definitely weaken/ wear out a battery.
I don't know how 'smart' the charging system is in most chargers & cell phones, and imagine it might vary significantly from one model to another. It's considered to be something worth advertising in most other things with rechargeable batteries (power tools, etc.) , but I don't think I've ever seen mention of it as a "feature" in a cell phone or charger. Not sure why.

Most chargers, especially ones of efficiency level IV, V, or VI will automatically reduce and stop charge as the battery becomes full. It's fine to charge at any level with a lithium battery, which doesn't have the memory effect that NIMH and Nicad batteries have. I usually charge my devices in the middle of the night as there's less electricity demand, it's not as hot, and I'm not using them.

According to this, BU-808: How to Prolong Lithium-based Batteries - Battery University, it's best to constantly charge & discharge the battery, to never leave the phone charging after reaching 100%, & to never ever let charge go to 0%.

So according to BU-808: How to Prolong Lithium-based Batteries - Battery University should I be charging the phone at 40%? Did I read that right? Man, I have been charging my phone the wrong way all these years, I let it drain down to 5% because I had been told that's the way to do it. 40-50% is wow - or did I read it wrong?

I think if you can do the 40-50% all the time, it might be best, but practically, I just use the rule to never let it go down to 0%, & to never continue to charge it once 100% is reached. "Never," as I've used it, is defined as "as best as I can try not."

Wait. I am confused. I understand why you should not continue charging a battery past 100%
But but but

All phones stop charging once it hits 100%. So why can you not leave phone plugged in over night?

The danger is how good the sensing "off" switch is in stopping current to the batteries. Prolonged attempted charging after a fully-charged state may end up forming crytalline structures in the battery, and/or burning holes in the interior insulator.
A good "smart" charging system will either shut off the charge cycle entirely, or reduce the current to a small trickle (to maintain a full charge, and more effectively 'fill' the battery to maximum capacity.)
It seems likely that the "smart" capability of phones/chargers to do this will vary.

For practical purposes, I wouldn't worry about leaving a phone on a charger overnight, or for hours after a full charge is established. I would not, however, leave a phone on a charger for days.

As a contrarian data point, my wife's old iBook has been on a charger essentially continuously for well over a decade, except on the rare occasions when she really needs to use it on battery. As far as I can tell from my last test, the battery has suffered no significant damage in capacity, & has lived far longer than I would have expected if a normal charge/discharge pattern had been observed. My laptops of similar age, following a more traditional charge/discharge pattern, have either failed batteries or seriously diminished battery capacity. I expect that this may speak more to Apple's excellent design of the charging system & battery than to justifying a similar method for other batteries.

So with premium phones like galaxy s2.3.4.5.6.7.8

There is a danger? I would think not.

The real danger is not ruining a battery , but having a battery leak or catch fire.

The s3 battery does get warm when playing graphic intense games