A chemist told me that a battery should be charged to and used between 30-70%, and its very bad for battery life to completely load or unload it.

He uses a utility program that always keeps the charge of his Lenovo laptop between 30% and 70%.

How can I achieve the same effect using Mac OS X?

Update (7 Years later): Its finally here, Apple introduces 'introduces battery health management': https://support.apple.com/en-gb/HT211094

  • 4
    Why care about anything? :) The point is, i'm a student and i want care about my stuff. I use my macbook as often as possible on power adapter, and so it would be good if i find a tool which stops at 70% loading.. (btw. thanks for editing)
    – lhlmgr
    Aug 18, 2012 at 10:19
  • 2
    If you care about your battery life, the most important thing to take into account is temperature. High temperatures (>35C) will permanently damage a batteries capacity. Low temperatures have a similar temporary effect. Also, modern batteries need to be used for maximum performance. If you don’t use your device often or have it hooked up to a power source all the time, be sure to complete a charge cycle at least once a month. See here for more info. I wouldn't worry too much about the whole 30-70% thing - couldn't find any evidence to support that claim
    – user132234
    Aug 18, 2012 at 10:32
  • 9
    @ThomasPloeger The claim you couldn't find any evidence for is mentioned in the Wikipedia article about lithium ion batteries.
    – Daniel Beck
    Aug 18, 2012 at 11:50
  • 3
    @ThomasPloeger Good question. I still see this as a problem of long-term storage though, especially since the computer's heat will advance battery deterioration independent of load level. We seem to have several good questions about the general topic in the battery-life tag.
    – Daniel Beck
    Aug 18, 2012 at 12:57
  • 4
    @DanielBeck The reasoning is essentially that we would prefer, on extended desk-bound sessions, to keep the charge constantly at, say, 60%, which is in the long run less detrimental than keeping it constantly at 100%, all else being equal (a power adapter ready and willing to supply juice). Just before a trip or any normal portable usage session, the battery is to be topped off to 100%. I do believe that for most of us, myself included, the benefit of always being at the ready with battery fully charged outweighs that benefit. I think it's legit to want a way to keep a specified charge level.
    – Steven Lu
    May 30, 2014 at 17:50

8 Answers 8


This is now supported through a tool that edits charge level in SMC:


I have it installed on my Macbook 12 (2016 model) it's sitting at 70% plugged in.

  • I needed to restart my MacBook for it to work properly Feb 23, 2021 at 14:28
  • didn't work for me. still charging even I restarted my macbook pro 2015. May 15, 2021 at 16:48
  • Confirmed to work on the MBP 16" 2019 v11.4 Jun 21, 2021 at 14:38
  • It didn't work for me on MBP 13 early 2015.
    – Necktwi
    Aug 30, 2021 at 9:57

I have used a piece of receipt from shop. It is thin enough to fit. The goal is to close middle connector. It is possible to close also 2 connectors at the left or at the right. For example close 3rd, 4th and 5th connectors, but leave free 1st and 2nd or conversely.

enter image description here enter image description here

enter image description here

  • 2
    is this dangerous? can somebody provide a pin out? if this can be used to only use power source, and not charge battery, thats good enough solution
    – ArtDeineka
    Oct 13, 2017 at 13:12
  • 1
    "is this dangerous?" It didn't break my mac. And there is no breaking statistics. So use it at your own risk. Oct 16, 2017 at 18:14
  • 2
    @ArtDeineka I've googled that for you: magsafe pin out. Result number 1: en.wikipedia.org/wiki/MagSafe . Middle pin controls charge. outer 2 are just plain ground and V+ that cannot charge with the middle disconnected.
    – Chris
    Mar 11, 2018 at 19:00
  • 1
    Is there a ready solution for this hack? Maybe a plug that has a switcher for the middle pin.
    – Finesse
    Apr 22, 2020 at 8:49
  • 2
    It makes MacBook neither charge nor use the battery. MacBook uses the energy from the power adapter and the battery self-discharges slowly. So you need to charge the battery to a required maximum level (e.g. 70%) first, then apply the hack and watch the charge to not get below a required minimum level (e.g. 30%).
    – Finesse
    Apr 24, 2020 at 7:30

Based on this article:

  • Use partial-discharge cycles
  • Avoid charging to 100% capacity: why don't you unplug the charger now and then? Or try that software : http://fruitjuiceapp.com/ (Note: I haven't tried it myself...)
  • Limit the battery temperature: make sure your laptop is well vented, and do not forget your laptop in your car during the summer.
  • Do not charge your battery in a cold environment (<0deg Celcius). The charger circuitry is supposed to monitor the temperature but just in case...
  • A little addition regarding useful softwares (OK they do not prevent from charging above a certain level, but they may help): coconutBattery, very lightweight, and MiniBatteryLogger, that logs your battery history. This one is a little bit old but works on my 2012 Macbook air.
    – sdive
    Jan 16, 2013 at 8:21
  • 6
    " why don't you unplug the charger now and then?" no no no, you're just adding on pointless charge cycles.
    – Alexander
    Mar 27, 2018 at 3:52

I didn't find a pure Software solution, so I've set up a quick hack based on the Belkin WeMo Switch and a Node.js app. The WeMo is a power outlet that can be switched on and off via Wifi. So you can plug your laptop charger on the WeMo, and a script or an app running on your laptop monitor the battery and switch the outlet on and off accordingly.

Edit: more explanations from the original blog post (the link is dead.):

My inspiration came from an Article on Wired, explaining that to improve your battery life, you must keep it charged in the 40% - 80% range.

In fact I really doubt the Wired article really make sense. "Not charging the battery up to 100% increase the discharge cycles", ok it's probably true. If the laptop is almost always plugged in and the battery is at 100%, you can expect 300-500 cycles, but your are only "using" a cycle once in a while. If the laptop is permanently cycling between 40-80% you can get 1200-2000 cycles, ok it's a lot more, but you are now using 10 cycles a day.

I'm not chemist and I don't know what's really going on in the battery. What happens if instead of doing 40%-80% cycles, we do tens of thoushands 79%-80% cycles ? What percentage variation is considered a cycle ? Does 0%-80% cycles are better than 20%-100% ? As always the evil is probably in the details, and all batteries, even among the LiPo familly have different specifications.

I think it would be more useful to just pop up a notification if the battery get lower than x%. Just to remind you that if you are close from a power source that would worth it to plug your laptop.

  • That's awesome! I wish I could get all my li-ion powered devices to do that... Aug 21, 2014 at 18:22
  • 3
    This causes only permanent load-unload cycles. A stopped loading at, e.g. 70% - well - simply stops just loading the battery while the machine is still powered from the power cord.
    – Thomas S.
    Jun 6, 2016 at 6:53
  • For the time spent building this, you probably could have bought 10 batteries and peace of mind of not needing to micromanage something like this for so little gain lol
    – Alexander
    Mar 27, 2018 at 3:55
  • 1
    @Alexander: unfortunately not. I'm not payed the price of 10 battery replacement at $199 for every couple of hours I spent experimenting for fun on my laptop ;) I never used the solution I proposed. It was just an advanced "hello world" for the WeMo (it's probably clearer since the edit) Mar 27, 2018 at 14:36
  • 3
    Yeah why optimize things we all know that resources are unlimited, used batteries, plastics magically disappear. There is no such thing as pollution, it's so stupid to micro-manage engines for a few drops of efficiency. We should all be running 5 liter engines and not bother. Petrol is also unlimited. Yes, buy 10 batteries. Good idea. You can always throw them away if you don't need them. lol.
    – Rolf
    Apr 5, 2018 at 9:39

Unlike a Thinkpad, there is no way to control the firmware on a Mac. The only way I have found to stop the charge while running off the line power is to insert a thin piece of paper between the plug and the laptop. If you block the middle conductor, the laptop will be unable to identify the power supply, and will therefore refuse to charge the battery, which is the desired result.

  • even on Thinkpads , the custom charging software (that also read cycles from battery) works on older version of Windows, it worked on the win7 that came with it, but on Win 8.1 pro x64 does not exist. Even now Windows 10 is released i think they will not support it anymore. Tested on an Lenovo x240 Jul 29, 2015 at 17:08

[Removed part in which I quoted an answer in this same question by error, left for the comments]

You need to put a thin tape in the middle connector of your magsafe to avoid the connector to be identified, but still uses A/C so your battery stays at the same level (actually it loses ~2%/day, but still much healthier for the mac)

  • You have linked to question which you are answering. Are you sure that your solution is 100% safe?!?
    – g2mk
    Dec 30, 2015 at 12:06
  • 3
    "but still much healthier for the mac)" [citation needed]
    – Alexander
    Mar 27, 2018 at 3:54
  • 1
    Yes it's completely safe, I tried it for a long time. The only thing that harms the health of a battery is using it (charge cycles of charge and uncharge). This is the only real method that prevents both charging and uncharging the battery, letting the electric current to go straight to the machine. In fact, the only way a Mac tells you how healthy is its battery is by counting the charge cycles. It will stop working and ask you to change it when it reaches 1000 (in most cases, although there's a support page where you can check this). This solution stops the cycle count. Mar 29, 2018 at 12:42

Based on this article, macOS can limit battery capacity used by default. Make sure the Manage battery longevity setting is on.


Found a free cli tool, https://github.com/actuallymentor/battery, works like a charm, you need to type battery charging on before you unplug it and you need to type battery charging off before you plug it in. It works on m1 macs not sure about Intel macs.

  • 1
    This answer seems a bit spammy.. you posted the same answer on Ask Different, plus it doesn't say that it works on Intel... it explicitly mentions only M1 Aug 2, 2022 at 3:19
  • Sorry I was wrong to assume. I wasn’t spamming I’m just trying to answer the question because I was trying to find an answer here for my m1 max and update my question as well.
    – anarchy
    Aug 2, 2022 at 3:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .