
Quick Answer
To test your Mac’s RAM, shut down the Mac, disconnect unnecessary accessories, and start Apple Diagnostics:
- Mac with Apple silicon: Press and hold the power button until startup options appear, then press and hold Command-D.
- Intel-based Mac: Turn it on and immediately press and hold D. If that does not work, try Option-D.
Follow the on-screen instructions and note any reference code. A code related to memory or RAM can indicate a hardware problem, but a test that reports no issue does not rule out every intermittent memory or logic-board fault.
What Apple Diagnostics Tests
Apple Diagnostics is a built-in hardware-testing tool. It checks your Mac for certain problems involving components such as memory, the logic board, battery, processor, and wireless hardware.
RAM—also called memory—is the short-term workspace macOS uses for running apps and handling data. Faulty RAM can cause symptoms such as:
- Unexpected restarts or shutdowns
- Kernel panics
- Apps that quit without warning
- Frozen screens
- Corrupted files
- Failure to start normally
- Repeated beeps or flashing lights during startup on some Intel Mac models
Apple Diagnostics is useful because it runs outside your normal macOS installation. However, it is not a complete memory stress test and may not detect every problem, especially an intermittent fault.
Before starting, save your work. The test requires a restart or startup process, so unsaved changes may be lost.
Before Testing Your Mac’s RAM
Complete these preparations before running the test:
- Save and close your work. Apple Diagnostics cannot protect unsaved documents.
- Shut down the Mac completely. Do not merely close the lid or choose sleep.
- Disconnect unnecessary devices. Remove external drives, hubs, printers, phones, and other accessories. Leave the power adapter connected if possible.
- Use a stable power source. A MacBook should have adequate battery charge or remain connected to power.
- Note recent symptoms. Record when crashes occur, which apps are open, and whether the problem happens after waking, under heavy workload, or during startup.
Keep essential input devices connected if your Mac requires them. A wired keyboard can be helpful if a wireless keyboard does not respond during startup.
How to Run Apple Diagnostics on a Mac with Apple Silicon
These steps apply to Macs with Apple silicon, including M-series processors.
- Choose Apple menu > Shut Down and wait for the screen to go completely dark.
- Press and hold the Mac’s power button.
- Continue holding the button until you see startup options or a screen labeled Loading startup options.
- When startup options appear, press and hold Command-D.
- Release the keys when Apple Diagnostics begins.
- Choose a language if prompted.
- Read the on-screen information and allow the test to finish.
- Write down the reference code and any other details shown.
If the Mac starts normally instead, shut it down and try again. Make sure you hold the power button continuously until startup options appear; pressing and releasing it briefly will normally start macOS.
For broader startup instructions, see How to Run Apple Diagnostics on a Mac.
How to Run Apple Diagnostics on an Intel-Based Mac
Use these steps for a Mac with an Intel processor:
- Choose Apple menu > Shut Down.
- Press the power button to turn on the Mac.
- Immediately press and hold the D key.
- Keep holding D until Apple Diagnostics starts or you see a language-selection screen.
- Choose a language if requested.
- Wait for the test to complete.
- Record any reference code displayed.
If holding D does not start the test, shut down the Mac and try again with Option-D. This alternate shortcut may start Apple Diagnostics over the internet when the local diagnostic software is unavailable.
On some Macs, the timing can be difficult. Begin holding the key immediately after pressing the power button, rather than waiting for the Apple logo.
What to Do When the Test Finishes
Apple Diagnostics usually displays one of two general outcomes:
- A message indicating that no issues were found
- A reference code identifying a possible hardware or support issue
If Apple Diagnostics reports a memory-related code
Write down the code exactly as shown. Do not rely on memory or take a partial photo that omits the beginning or end of the code.
A RAM-related result can mean that the memory module, memory controller, or another part of the logic board needs attention. On Macs with non-upgradable unified memory, the memory is integrated with the system and cannot normally be removed or replaced separately.
Next steps include:
- Run Apple Diagnostics one more time after shutting down completely.
- Disconnect all nonessential accessories before repeating the test.
- Back up important files as soon as possible if macOS still starts.
- Contact Apple Support or an Apple Authorized Service Provider.
- Provide the exact reference code and explain the symptoms you observed.
You can also use How to Interpret Apple Diagnostics Reference Codes on a Mac to understand what the result may indicate.
Do not erase the Mac or reinstall macOS before backing up your data. Software troubleshooting will not repair physically defective RAM, and a failed memory component can make data access less reliable.
If Apple Diagnostics reports no issues
A clean result is encouraging, but it does not prove that the RAM is perfect. Apple Diagnostics may not reproduce a fault that occurs only under a particular workload, temperature, or timing condition.
Continue investigating if the Mac still crashes. Look for patterns such as:
- Problems that occur only with one app
- Crashes after waking from sleep
- Failures during video editing, gaming, or other memory-intensive work
- Problems that began after installing external hardware or software
- Symptoms that disappear in Safe Mode
Keep a current backup while troubleshooting. If the Mac becomes unstable or cannot start, use another device or Apple Support to determine the safest recovery option.
How to Tell Whether RAM Is Really the Cause
Memory symptoms often resemble software, storage, overheating, or power problems. A Mac that feels slow does not necessarily have defective RAM.
Check available memory in Activity Monitor
Activity Monitor can show whether macOS is under memory pressure:
- Open Applications > Utilities > Activity Monitor.
- Click the Memory tab.
- Review the Memory Pressure graph at the bottom of the window.
- Look at the Memory column to see which apps and processes are using the most memory.
High memory use by itself is normal. macOS uses available memory for caching and may compress memory when necessary. Persistent yellow or red memory pressure, combined with crashes or severe slowdowns, is more useful evidence than the amount of memory shown as “used.”
If you want to identify memory-heavy processes from Terminal, see How to Check Which Process Is Using the Most Memory on a Mac in Terminal.
Test without unnecessary accessories
A defective hub, external drive, display adapter, or other peripheral can cause crashes that look like memory problems. Shut down the Mac, disconnect accessories, and use it normally for a while.
If the problem stops, reconnect devices one at a time. This can identify the accessory or connection that triggers the failure.
Check whether one app causes the crashes
If crashes occur only in one application, update that app and macOS through the normal software-update process. Also check whether the app depends on extensions, plug-ins, or external devices.
A single-app failure is less likely to indicate defective RAM than crashes across many unrelated apps, although it does not rule out a hardware issue.
Use Safe Mode when appropriate
Safe Mode starts macOS with additional checks and prevents some software from loading normally. It can help distinguish startup software from a hardware problem.
The exact procedure depends on whether the Mac has Apple silicon or an Intel processor. Before using Safe Mode, save your work and expect the Mac to restart. If the issue disappears in Safe Mode but returns during a normal startup, investigate login items, extensions, and recently installed software.
Limitations of Apple Diagnostics
Apple Diagnostics is a first-line check, not a full laboratory-grade RAM test. Keep these limitations in mind:
- A single successful test may miss an intermittent fault.
- A reference code may identify a suspected area rather than a replaceable part.
- Some startup or power problems can prevent the test from running.
- A software crash can resemble a hardware failure.
- External devices can create symptoms that are unrelated to internal RAM.
- On many newer Macs, memory is integrated and is not user-serviceable.
Do not open a MacBook or attempt to remove internal components unless you are qualified to service that model. Opening the computer can cause damage and may create additional safety or repair concerns.
Troubleshooting Apple Diagnostics
Apple Diagnostics will not start
Try these steps:
- Shut down the Mac completely.
- Disconnect nonessential accessories.
- Connect the power adapter.
- Use the correct procedure for Apple silicon or Intel.
- On an Intel Mac, try Option-D if D does not work.
- Try a wired keyboard if the built-in or wireless keyboard does not register the shortcut.
If the Mac cannot reach startup options or Apple Diagnostics after several attempts, the problem may involve the keyboard, startup firmware, power system, or logic board.
The Mac starts macOS instead of running the test
The key was probably pressed too late, released too soon, or not recognized. Shut down again and begin the required shortcut immediately after turning the Mac on.
For Apple silicon, hold the power button until startup options appear before pressing Command-D. For Intel, hold D immediately after pressing the power button.
The test freezes or cannot finish
Wait briefly to determine whether the test is still progressing. If it remains unresponsive, hold the power button until the Mac turns off. This forces a shutdown and can cause loss of unsaved work, so use it only when the test is clearly stuck.
Disconnect accessories and run Apple Diagnostics again. If the failure repeats, record what happened and contact Apple Support or a qualified service provider.
The Mac has no display but appears to be running
Check the display connection and remove external displays or adapters. If the MacBook’s built-in display remains blank, try the startup process again with accessories disconnected.
Repeated blank-screen behavior, startup beeps, or flashing indicator lights should be documented and reported with the exact Mac model and symptoms.
You received a code but cannot tell whether it concerns RAM
Record the complete code, including letters, numbers, and punctuation. The code’s meaning depends on its exact format. Avoid interpreting a shortened code or assuming that every crash is a memory failure.
For additional hardware details, you can use How to check Mac hardware information in Terminal, but hardware information commands do not replace Apple Diagnostics.
Frequently Asked Questions
Can Apple Diagnostics test all of my Mac’s RAM?
It can check for certain memory-related hardware problems, but it is not guaranteed to detect every intermittent or marginal RAM fault. Repeating the test and documenting recurring symptoms can help.
How long does Apple Diagnostics take?
The duration varies by Mac and the checks being performed. Keep the Mac connected to power and allow the test to finish rather than interrupting it.
Can I run Apple Diagnostics without an internet connection?
A Mac may be able to run built-in diagnostics locally. On some Intel Macs, Option-D can start an internet-based version when local diagnostics are unavailable, so a working network connection may be required for that method.
Does high memory use mean my RAM is defective?
No. macOS commonly uses available memory to improve performance. Focus on the Memory Pressure graph, repeated crashes, kernel panics, and diagnostic codes rather than the used-memory number alone.
Can I replace the RAM in a MacBook?
It depends on the model. Many newer MacBooks use integrated memory that cannot be upgraded or replaced as a separate component. Older models may also have memory that is difficult or unsafe for inexperienced users to service. Check the exact model before considering repair.
Should I erase my Mac after a RAM error?
No. Back up important files first and seek service advice. Erasing macOS will not repair defective memory and could make data recovery more difficult.
Final Thoughts
Apple Diagnostics is the safest built-in way to check a MacBook for certain RAM and other hardware errors. Use the correct startup procedure, disconnect unnecessary accessories, record any reference code, and keep a backup of important data. If the test reports a memory problem—or the Mac continues crashing despite a clean result—Apple Support or a qualified repair provider can help determine whether the issue is RAM, the logic board, software, or another component.