Estimating the overlap between two states is an important task with several applications in quantum information. However, the typical swap test circuit can only measure a sole pair of quantum states at a time. In this study, a recursive quantum circuit is designed to measure overlaps of n quantum states |ϕ1〉,|ϕ2〉,…|ϕn〉\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$\\left | {\\phi _{1} } \\right \\rangle ,\\left | {\\phi _{2} } \\right \\rangle ,\\ldots\\left | {\\phi _{n} }\\right \\rangle $\\end{document} concurrently with O(k2k)\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$O(k2^{k})$\\end{document} controlled-swap(CSWAP) gates and O(k)\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$O(k)$\\end{document} ancillary qubits, where k=⌈logn⌉\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$k=\\left \\lceil {\\log n} \\right \\rceil $\\end{document}. All pairwise overlaps among input quantum states |〈ϕi|ϕj〉|2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$|\\langle \\phi _{i}|\\phi _{j}\\rangle |^{2}$\\end{document} can be obtained in this circuit. Compared with existing scheme for measuring the overlap of multiple quantum states, the circuit provides higher precision and less consumption of ancillary qubits. In addition, some simulation experiments are performed on IBM quantum cloud platform to verify the superiority of this algorithm.