Your laptop, onaround the clock.
BatteryGuard protects your battery from wear by holding it between 50 and 80% charge.
What always on does to the battery
- 100%100%
To stay on around the clock, a MacBook never leaves its charger. The battery sits at 100% for weeks.
- 100%100%
Lithium batteries kept full and warm lose capacity faster.
- 60%60%
With a limit, charging stops lower. The Mac stays on, running on its adapter.
What always on does to the battery
To stay on around the clock, a MacBook never leaves its charger. The battery sits at 100% for weeks.
Lithium batteries kept full and warm lose capacity faster.
With a limit, charging stops lower. The Mac stays on, running on its adapter.
Try it yourself.
This is the panel you open from the menu bar. Drag the marker on the battery anywhere from 50 to 80%, in steps of 5.
Stops at 60%. Resumes at 58%.
In the demo these buttons do nothing.
Drag the marker or use the arrow keys
From 50 to 80%. Drag the marker or use the arrow keys to change it.
A MacBook is a good machine to leave on at home. It's quiet and draws little power. It also has a battery of its own, for a power cut or for the day you take it with you.
That battery just shouldn't sit at 100% for months.
Everything else stays the same. What you leave running keeps running.
The chemistry, in short.
A lithium battery ages with every cycle, as you use it. It also ages with time, even when it sits still. A Mac that's always plugged in does very few cycles. What counts is time, and the charge level it spends that time at.
More charge, higher voltage
The fuller a lithium cell, the higher its voltage. At a high charge, a film on the graphite anode (the SEI layer) grows faster and uses up lithium. Above 4.1 volts per cell, in the heat, the electrolyte also oxidises at the cathode. These reactions are slow, and they carry on even when the Mac isn't drawing on the battery.
What the battery loses
Capacity, which means less runtime once you unplug. And its internal resistance goes up, so it handles peak demand less well. Neither comes back.
One year in storage
Battery University estimates how much capacity a lithium cell can recover after a year in storage. At 25 °C, a cell kept at 40% keeps 96%; kept at 100%, it keeps 80%. In the heat the gap gets wider.
Why 50 to 80
Less charge means less voltage and less stress on the cell. But on the day you unplug, you want some runtime left. 50% is the level Apple recommends for storing a battery long term, partly because one left empty risks a deep discharge. 80% is the lowest setting of the Charge Limit Apple added in macOS 26.4, and Apple too tries to cut the time a Mac spends fully charged. In between, you pick.
Laboratory estimates on generic lithium cells (Battery University, BU-808, table 3). Not a forecast for your Mac.
| Charged to | Cycles | Stored energy |
|---|---|---|
| 4.20 V | 300-500 | 100% |
| 4.06 V | 600-1,000 | 81% |
| 3.92 V | 1,200-2,000 | 65% |
Estimates for generic cells (Battery University, BU-808, table 4). Cells with higher charge voltages may differ.
Sources
- Battery University, BU-808: How to prolong lithium-based batteries
- Battery University, BU-808b: What causes Li-ion to die?
- Keil et al., Calendar aging of lithium-ion batteries, Journal of The Electrochemical Society, 2016
- Apple, Batteries: maximizing performance
- Apple Support, Optimized Battery Charging and Charge Limit on Mac
For the Mac that never switches off.
- agent running · 03:12
Your agents, on at home
Claude Code and similar tools need a computer that stays on. If yours is a MacBook, leave them running and the battery holds at your limit.
- Up 41 days
A home server
An old MacBook makes a quiet server for backups and automations. If it stays plugged in for years, it needs a limit.
- External display connected
Desk with an external display
Lid closed, monitor on, cable always in. Plenty of MacBooks spend every working day like this.
- Exporting · 62%
Long renders and exports
Hours of rendering heat the Mac up. Heat and a full charge together are the worst case for a battery.
- Mon to Fri · 9 to 6
The office Mac
Same desk, same charger, every working day. Set the limit once and forget about it.
50%
The lowest limit you can set. Lower than any limit built into macOS.
0
Scheduled charges to 100%. Your limit stays where you put it.
13
The oldest macOS it runs on. Up to 26.3 the system has no fixed limit, so it covers 80% as well.
Three steps. One is macOS asking.
BatteryGuard isn't signed with an Apple Developer ID, so macOS stops it the first time. You allow it once and it doesn't ask again.
BatteryGuardApplicationsDrag to Applications
Open the disk image and drag BatteryGuard into the Applications folder.
- Privacy & Security
Open Anyway
Go to System Settings > Privacy & Security and click Open Anyway at the bottom. Then confirm with Open. It may ask twice, for the disk image and for the app.
Turn on the limit
Open BatteryGuard from the menu bar and click Turn on charge limit. Your administrator password installs the background service, once.
Or install from Terminal
The script downloads BatteryGuard, checks its SHA256 and copies it to Applications. macOS doesn't block files downloaded from Terminal, so you skip step 2.
curl -fsSL https://github.com/alessiocardelli/batteryguard/releases/latest/download/install.sh | bashEvery line is public.
The background service has one job. Every five seconds it reads the battery level and switches charging off or on through the Mac's power controller. It makes no network connections. Turn off the limit and it removes itself, with charging back to normal.
Read the code on GitHubMIT licence
Questions
On recent versions, partly, and it does it well. Since macOS Tahoe 26.4, Apple silicon Macs have a Charge Limit from 80 to 100%. Apple notes that the Mac still charges to 100% now and then, to keep its battery estimates accurate. BatteryGuard goes lower, from 50 to 80%, and keeps your limit without those full charges. On macOS 13 to 26.3 there's no fixed limit: Optimized Battery Charging holds at 80% only when it predicts you'll stay plugged in. There, BatteryGuard covers 80% too.
BatteryGuard isn't signed with an Apple Developer ID, which requires a paid Apple developer account. Gatekeeper stops apps without one the first time they open. You allow it once from System Settings > Privacy & Security > Open Anyway.
You can check for yourself. The code is on GitHub under the MIT licence. The service needs your password because only an administrator can talk to the power controller, and it uses that access to switch charging off and on. It makes no network connections.
It's how macOS lists the background service of an app without a Developer ID, under System Settings > General > Login Items. After you uninstall, the entry can stay there. It's left by the system and runs nothing.
It needs Apple silicon (M1 or later) and macOS 13 Ventura or later. Intel Macs aren't supported. To check, open Apple menu > About This Mac and look at the Chip line.
While the Mac sleeps, the service can't act, and the battery can charge past your limit. On a Mac kept awake around the clock this rarely happens. BatteryGuard doesn't drain the battery, so if it went over, it comes back down only when you use the Mac unplugged.
In the app, click Turn off limit and enter your password. That removes the service and its files and turns charging back on. Then move BatteryGuard to the Bin.
AlDente is a complete battery manager, with discharge, heat protection, calibration and more. BatteryGuard does one thing, the charge limit, and its code is public. Use one at a time. With both running, two apps try to control the same charging.