For the duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any.
The spell can penetrate most barriers, but it is blocked by 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt.
How Detect Magic plays
For up to 10 minutes, while you concentrate, you sense whether there’s magic within 30 feet of you. If there is, you can use your action to see a faint aura around each visible creature or object that carries magic, and learn its school of magic, if any.
It answers the questions that come up constantly in a dungeon. Which of these swords is magical? Is this door warded? Is the duke under an enchantment? Is that statue just a statue? It won’t tell you what an item does, only that it’s magic and which school, but that’s often enough to know which treasure to identify first and which altar not to touch.
When to pick Detect Magic
Cast it as a ritual. It takes 10 minutes longer but costs no slot. Bards, clerics, druids and wizards can cast rituals; paladins, rangers and sorcerers have to spend a slot.
Someone in every party should have it. Seven classes can take it.
Use the school as a clue. Abjuration suggests a ward or trap, enchantment a charm, necromancy something dead that shouldn’t be moving, and illusion something that isn’t what it seems.
Common questions
Does Detect Magic tell me what an item does?
No. It shows that the item is magical and its school of magic. To learn its properties, cast Identify or spend a short rest handling it.
Can Detect Magic find invisible creatures?
It can tell you there’s magic nearby, but you only see auras around creatures and objects you can see, so it won’t outline an invisible creature.
What blocks Detect Magic?
1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt.
Do I sense everything magical within 30 feet at once?
You sense that magic is present. Seeing auras and learning schools takes your action, and only for things you can see.
Can a sorcerer cast Detect Magic as a ritual?
No. Sorcerers, paladins and rangers don’t have ritual casting, so they must spend a slot. Bards, clerics, druids and wizards can cast it as a ritual.
Does it detect magical traps?
It shows an aura around any visible object that carries magic, so a door or chest bearing a Glyph of Warding lights up. Magic hidden inside a wall or behind the barriers that block the spell stays hidden.
For the duration, you sense the presence of magical effects within 30 feet of yourself. If you sense such effects, you can take the Magic action to see a faint aura around any visible creature or object in the area that bears the magic, and if an effect was created by a spell, you learn the spell's school of magic.
The spell is blocked by 1 foot of stone, dirt, or wood; 1 inch of metal; or a thin sheet of lead.
2024 version from the SRD 5.2. Most tables settle on one edition, so check which one yours uses.