Use Apple Diagnostics to test your Mac
Apple Diagnostics, formerly known as Apple Hardware Test, can check your Mac for hardware issues.
If you think your Mac might have a hardware issue, you can use Apple Diagnostics to help determine which hardware component might be at fault. Apple Diagnostics also suggests solutions and helps you contact Apple Support for assistance.
Prepare your Mac
If you're able to install the latest macOS updates, do so before continuing.
Shut down your Mac.
Disconnect all external devices except keyboard, mouse, display, Ethernet connection (if applicable), and connection to AC power.
Make sure that your Mac is on a hard, flat, stable surface with good ventilation.
Start Apple Diagnostics
Determine whether you're using a Mac with Apple silicon, then follow the appropriate steps:
Press and hold the power button on your Mac. (Every Mac has a power button. On laptop computers that have Touch ID, press and hold Touch ID.)
As you continue to hold the power button, your Mac turns on and loads startup options. When you see Options, release the power button.
Press and hold Command (⌘)-D on your keyboard.
Turn on your Mac, then immediately press and hold the D key on your keyboard as your Mac starts up.
Release when you see a progress bar or you're asked to choose a language.
If using the D key doesn't work, press and hold Option (⌥)-D at startup instead. If neither method works, review the guidelines for using key combinations at startup.
You may be asked to choose a language and make sure that you have an active network connection. You can use thein the upper-right corner of your screen to choose a Wi-Fi network.
View the test results
Apple Diagnostics shows a progress bar while it's checking your Mac:
When testing is complete, Apple Diagnostics shows the results, including one or more reference codes:
To repeat the test, click “Run the test again” or press Command-R.
To restart your Mac, click Restart or press R.
To shut down, click Shut Down or press S.
To get information about your service and support options, make sure that your Mac is connected to the internet, then click ”Get started” or press Command-G. Your Mac will restart to a webpage with more information. When you're done, choose Restart or Shut Down from the Apple menu.
Apple Diagnostics reference codes
When you use Apple Diagnostics to test your Mac, the test results include one or more reference codes.