Short answer
Use a compass, a string, or a second magnet. A compass is the most direct test. The end of a magnet that attracts the north-seeking end of a compass needle is the magnet’s south pole, and the end that pushes that needle away is its north pole.
The naming trap
A magnet’s north pole is the end that points toward Earth’s geographic north when the magnet swings freely. That end is drawn toward the region near the geographic North Pole, which is itself a magnetic pole of the opposite kind. So the names are a convention, and they can look backward at first. The same convention shapes the answer to do magnetic fields point towards north or south.
Method 1: let it swing
Tie a string around the middle of the magnet, or float it on a small piece of cork in a bowl of water. Let it settle away from metal and other magnets. The end that comes to rest pointing north is the north-seeking pole. Check the result against a known compass, because nearby objects can throw off a result.
Method 2: use a compass
Hold a compass well away from metal, then bring one end of the magnet slowly toward the needle.
- If the needle’s north end, often marked red, is pulled toward the magnet, that end of the magnet is its south pole.
- If the needle’s north end is pushed away, that end of the magnet is its north pole.
Move slowly, because a compass close to a magnet can swing or stick. The effect is the same one covered in where does a compass point near a magnet.
Method 3: use a magnet you already know
Once you have one magnet with known poles, bring the unknown end toward it. Like poles repel, and opposite poles attract. A repulsion means the two ends match, and an attraction means they are opposite. This is a quick check once you have a reference, but test the reference first with one of the methods above.
Check the markings, then test
Some magnets come with poles marked by color or a letter. Those marks can be faded, missing or wrong, so run one of the tests before you rely on them.
Safety
Strong magnets, especially rare-earth types, can snap together hard enough to pinch skin or chip the magnet. Keep them away from phones, bank cards and drives, which can be damaged by a magnetic field. Keep strong magnets well away from anyone with a pacemaker or other medical implant.