Detract means to take away from the value, credit or reputation of something; distract means to pull someone's attention away from what they should be focusing on. Typos detract from an essay's quality; noise distracts a student during an exam. Both involve something being pulled away, but detract targets value and distract targets attention.
The core difference
Detract lessens value or reputation; distract pulls attention away from a task.
- detract — to take away from, or lessen, the value or reputation of something: The typos detract from an otherwise strong essay.
- distract — to pull someone's attention away from what they should be focusing on: The noise outside distracted the students during the exam.
How to tell them apart
Both words share the Latin root trahere, "to pull", but they pull different things. Detract pulls value or credit away from something, so it's usually followed by "from": something detracts from a reputation, an achievement or a piece of work. Distract pulls a person's attention away, so it's usually followed by a person as the object.
If the sentence is about a flaw lowering how good something seems, reach for detract. If it's about something interrupting a person's focus, reach for distract.