Chosen Solution
Hello, So I have a Macbook Air 13’ late 2017. Recently it started to do this thing when I switch it on. After entering my password, it turns itself off. After pressing the power button, It shows the battery exhausted. Once I connect the charger, it boots perfectly and shows battery percentage of around 13%. Please help.
It may be just a faulty or drained battery or worse, a problem with the charging circuit. To gather some more info and allow a bit more insight you may download Coconut Battery and enclose a screenshot with data to your original question, that will help figure out where the problem is.