Every organism has DNA (deoxyribonucleic acid) which carries genetic information. One of the methods for analyzing strings of DNA sequences is n-mers frequency. It is a data mining method on strings of DNA sequences that is converted into numerical data. We studied 13 deadly viruses, consisting of Rabies, HIV, Ebola, Smallpox, Marburg, Herpes B, Lujo, Avian Influenza, Spanish Flu H1N1, Dengue, HPV, SARS-CoV, and SARS-CoV-2. This study aims to establish the phylogenetic tree and find out the genetic relationship of the deadly viruses. The first method we used are collecting viral DNA sequences from the NCBI database. Afterward, the strings of DNA sequences were converted into numerical data using the n-mers frequency. After that, the dissimilarity matrix was calculated and the phylogenetic tree was established using the AGNES algorithm. Based on the phylogenetic tree, the aforementioned 13 viruses were classified into three clusters, namely cluster 1 from the realm Riboviria, cluster 2 from the realm Duplodnaviria and cluster 3 from the realm Varidnaviria. The clustering results of 13 viruses are valid because each virus is clustered based on its taxon. In addition, viruses that have the closest genetic relationship are grouped first, while viruses that have the distant genetic relationship are grouped later.