Can I tell my Mac to charge to 80% only?

Ask Different Asked by Doug on December 10, 2020

I leave my MacBook plugged in for days at a time, so the battery stays charged to 100%. Despite Apple claims to the contrary, I believe that the battery’s capacity would be better preserved if I could keep it at an 80% state-of-charge. Is there any command or setting that would let me disable charging from the power adapter?

Here are various options, (1) being my most preferred:

  1. A setting to automatically maintain battery at 80% SoC (like my Tesla has)
  2. A setting/command to use the AC adapter for running power only ("not charging" state)
  3. A command to tell my Mac to totally ignore the AC adapter power

(2) could be cobbled into (1) with some kind of script. Even if not possible from the Mac itself, (3) could be cobbled together with an IOT switch. But with (3), it’s unclear the lower maintained SoC would outweigh the cost of the additional cycling.

2 Answers

Use osx_battery_charge_limit.

Follow the instructions on github:

# 1. Install command-line tools
xcode-select --install

# 2. Install Homebrew
ruby -e "$(curl -fsSL"

# 3. Install Python3
brew install python3

Alternatively, you can also get python3 from

Then, git clone --recursive, cd osx_battery_charge_limit, and finally sudo python3 -s 80

I think it might be better if you set it even lower, for example, 60% or 70%. Then, before you need to use it on battery for a long time, sudo python3 -r. You can automate this switching between 80% and full using cron.

There is also a GUI version: Both work by setting the BCLM key in SMC to a custom value.

Correct answer by Joy Jin on December 10, 2020

MacOS 11 Big Sur has this option (even a bit smarter) embedded, see Optimise battery charging

enter image description here

Edit: As Joy pointed out, this has been added already in macOS 10.15.5.

Answered by Jarek on December 10, 2020

Add your own answers!

Related Questions

Create a disk image for recovery

1  Asked on January 26, 2021 by ispiro


Unmount Volume on User Logout

2  Asked on January 24, 2021 by haravikk


How do I reduce the delay when unlocking my Mac?

1  Asked on January 23, 2021 by freeviruses


iPhone: share with instagram

10  Asked on January 22, 2021 by user62304


macOS High Sierra: Create Windows bootable Usb

6  Asked on January 21, 2021 by yannisalexiou


iPhone 6- Boot Loop- Error 9

0  Asked on January 20, 2021 by salient24


Reattaching microphone on iMac 21.5″ 2017

0  Asked on January 17, 2021 by orun


HTTP connections by neo4j clients blocked

0  Asked on January 16, 2021 by oscar-serna


How do I force a “Waiting” file to upload to iCloud?

11  Asked on January 15, 2021 by dan-j


Changing MAC Address and undoing changes

1  Asked on January 14, 2021 by zy-mazza


MacBook Pro 2020 Fan Issues

1  Asked on January 13, 2021 by ifandonlyif


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP