How do DNA tests tell if two people are related?

How can DNA from a cheek swab determine if someone is closely related to you?

an illustration of DNA
DNA tests can shed light on where your family is from and help connect you with potential relatives. How?
(Image credit: Yuichiro Chino via Getty Images)

DNA tests can tell people where in the world their ancestors came from, and if they're at risk of developing different genetic conditions. They can sometimes even help people connect with family members they never knew they had.

But how do these DNA tests work, and how can they tell if two people are related to each other?

Skyler Ware
Live Science Contributor

Skyler Ware is a freelance science journalist covering chemistry, biology, paleontology and Earth science. She was a 2023 AAAS Mass Media Science and Engineering Fellow at Science News. Her work has also appeared in Science News Explores, ZME Science and Chembites, among others. Skyler has a Ph.D. in chemistry from Caltech.