Products featured in this Yahoo article are selected by our shopping writers. We will earn a commission from purchases made via links in this article. Pricing and availability are subject to change.

What is a paternity test and how does it work?

Paternity test. (Getty Images)
You need to have consent from the alleged father to do a paternity test. (Getty Images)

Sir David Jason has discovered he has a daughter he didn't know about after agreeing to do a paternity test.

The Only Fools and Horses actor, 83, shared his revelation and joy at being the father of a 52-year-old woman and grandfather of a 10-year-old boy in an interview with The Mirror.

But what exactly is a paternity test and how does it work?

What is a paternity test?

A paternity test is a type of DNA test.

"It allows you to check a sample of your DNA against someone who is your [alleged] father, via a mouth swab which is then tested and analyse in a lab," explains Dr Hana Patel, also a GP expert witness.

This can be done to establish or confirm proof of the biological relationship (or disprove it). The same can be done for a maternity test, which is done using a DNA sample from the mother.

Doctor doing cheek swab on male patient. (Getty Images)
A paternity test usually involves taking a DNA sample from your mouth with a swab. (Getty Images)

How does a paternity test work?

Once the swab is taken, the lab analysis will "look at genetic markers that are accurate in demonstrating a paternal (or maternal) relationship," says Dr Patel.

Both the alleged parent and offspring need to do the test as it compares these genetics "between the two for a certain number of matches to show if they are related".

As every person inherits half of their DNA from their father (and half from their mother), this comparison will be used to help establish how much DNA the suspected father has in common with the child, and then the probability of paternity.

Where can you buy a paternity test?

You currently can't get a paternity test on the NHS, but you can arrange the test yourself via trusted commercial companies, or even order online from stores like Boots. If you do take the swab yourself, this is known more as a 'peace of mind' or 'curiosity' test as it's not recognised legally.

See the official gov.uk website for accredited testing laboratories for different types of legal tests, including if you're getting one to use in court or if the Child Maintenance Service orders you to have one.

Man doing DNA test. (Getty Images)
You can do a paternity test yourself, but the results will be used only for personal information and will not be legally recognised. (Getty Images)

Do you need consent for a paternity test?

Dr Hana points out that there are laws requiring the consent of both parties to be tested.

Under the Human Tissue Act 2004, this is needed for the 'use and storage of a sample to obtain scientific or medical information about an individual that relates to another person', including paternity testing.

If one person involved is a child, people with parental responsibility can give consent, though the young person's views should be taken into account to determine whether it's in their best interests.

"It is illegal to take without their consent, but I have stories of patients taking their potential dad's hair, or doing it in their sleep," says Dr Hana, helping to explain why at-home tests aren't legally recognised.

How long does it take to get paternity test results?

This depends on the lab, but it can be as quick as same-day or next-day, depending on how much you want to pay. Otherwise, it's likely to be within a few days, once samples have been received.

Dr Hana says the standard cost is around £100.

You can buy paternity tests online at Boots, which cost £19.99 for the test, plus £99 for laboratory fees.

How accurate are the results?

"They're usually very conclusive," she adds, "at a rate of almost 99.99% accuracy, according to the labs."

Watch: Khloe Kardashian 'trying to remain positive' after Tristan Thompson paternity test result