{"id":66821,"date":"2026-10-15T09:20:32","date_gmt":"2026-10-15T06:20:32","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=66821"},"modified":"2026-10-15T09:20:32","modified_gmt":"2026-10-15T06:20:32","slug":"prime-factorization-calculator","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/mathematics\/prime-factorization-calculator\/","title":{"rendered":"Prime Factorization Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Find the Prime Factors of a Number<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"66821\" data-favorite-title=\"Prime Factorization\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/mathematics\/prime-factorization-calculator\/\" data-favorite-excerpt=\"Enter any integer from 2 to 1,000,000,000,000 and this calculator instantly finds its prime factorization in exponent form, lists all prime factors, identifies the largest one, and counts the number of divisors.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-arithmetic\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/mathematics\/prime-factorization-calculator\/\" method=\"POST\" class=\"calculator\" id=\"calculator-66821\" data-post=\"66821\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field has-term\" id=\"input-1\"><label for=\"field-1\">Number to factorize (n)<\/label><div class=\"term\">n<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"number_to_factorize_n\" id=\"field-1\" aria-describedby=\"calc-info-1\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" placeholder=\"e.g. 360\" min=\"2\" max=\"1000000000000\" value=\"360\"\/><small id=\"calc-info-1\">Any integer from 2 to 1,000,000,000,000 (10\u00b9\u00b2)<\/small><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"66821\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Results<\/h3><div class=\"result-box\"><div class=\"field-result is-column\" id=\"output-1\"><span class=\"field-title\"><span>Prime factorization (exponent form)<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-2\"><span class=\"field-title\"><span>Prime factors (with multiplicity)<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>Distinct prime factors<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>Largest prime factor<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-5\"><span class=\"field-title\"><span>Number of divisors<\/span><\/span><span class=\"field-value\" id=\"result-5\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-6\"><span class=\"field-title\"><span>Details and how it was calculated<\/span><\/span><span class=\"field-value\" id=\"result-6\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"66821\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Prime Factorization Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ n = p_1^{a_1} \\times p_2^{a_2} \\times \\cdots \\times p_k^{a_k} \\]\n\\[ d(n) = (a_1 + 1)(a_2 + 1) \\cdots (a_k + 1) \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(n\\) \u2014 the integer being factorized (\\(n \\geq 2\\))<\/li>\n<li>\\(p_1, p_2, \\ldots, p_k\\) \u2014 the distinct prime factors of \\(n\\), in increasing order<\/li>\n<li>\\(a_1, a_2, \\ldots, a_k\\) \u2014 the exponents: how many times each prime divides \\(n\\)<\/li>\n<li>\\(d(n)\\) \u2014 the total number of positive divisors of \\(n\\)<\/li>\n<\/ul>\n<p>Every integer greater than 1 can be written as a unique product of prime numbers \u2014 this is the Fundamental Theorem of Arithmetic. The first line is that unique product; the second line counts how many divisors the number has, based on its exponents.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Prime Factorization \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<p>{p}<strong>Example:<\/strong> find the prime factorization of 360, the default value in the calculator.<br \/>\n{\/p}<br \/>\n{p}\\[ 360 = 2 \\times 180 = 2 \\times 2 \\times 90 = 2 \\times 2 \\times 2 \\times 45 = 2 \\times 2 \\times 2 \\times 3 \\times 15 = 2 \\times 2 \\times 2 \\times 3 \\times 3 \\times 5 \\]<br \/>\n{\/p}<br \/>\n{p}\\[ 360 = 2^3 \\times 3^2 \\times 5 \\]<br \/>\n{\/p}<br \/>\n{p}<strong>Result:<\/strong> \\(360 = 2^3 \\times 3^2 \\times 5\\). It has 3 distinct prime factors (2, 3, 5), 6 prime factors counted with multiplicity, the largest prime factor is 5, and the number of divisors is \\(d(360) = (3+1)(2+1)(1+1) = 24\\).<br \/>\n{\/p}<\/p>\n\r\n<\/section>\n<h2>How to Use the Prime Factorization Calculator<\/h2>\n<ol>\n<li>Type your integer into the <strong>Number to factorize (n)<\/strong> field. Any whole number from 2 to 1,000,000,000,000 (10\u00b9\u00b2) is accepted; you can also use the arrows to adjust the value.<\/li>\n<li>Press the calculate button. The results appear immediately below.<\/li>\n<li>Read the <strong>Prime factorization (exponent form)<\/strong> for the compact answer, such as \\(2^3 \\times 3^2 \\times 5\\).<\/li>\n<li>Check the remaining fields: <strong>Prime factors (with multiplicity)<\/strong> lists every prime factor individually, <strong>Distinct prime factors<\/strong> counts the different primes, <strong>Largest prime factor<\/strong> shows the biggest one, and <strong>Number of divisors<\/strong> tells you how many positive integers divide your number.<\/li>\n<li>See <strong>Details and how it was calculated<\/strong> for a step-by-step explanation, including the verification that all factors multiply back to your original number.<\/li>\n<\/ol>\n<h2>What Is Prime Factorization?<\/h2>\n<p>A <strong>prime number<\/strong> is a whole number greater than 1 whose only divisors are 1 and itself \u2014 for example 2, 3, 5, 7, 11, and 13. A <strong>composite number<\/strong> has other divisors as well. Prime factorization is the process of breaking a composite number down into a product of primes that, when multiplied together, give back the original number.<\/p>\n<p>By the Fundamental Theorem of Arithmetic, this decomposition is <strong>unique<\/strong>: there is exactly one way to write any integer greater than 1 as a product of primes (ignoring the order of the factors). That makes prime factorization something like a fingerprint of a number. It is the foundation of many results in number theory, and it powers practical cryptography \u2014 the security of RSA encryption, for instance, rests on the fact that factoring very large numbers is computationally hard.<\/p>\n<p>The result is usually written in <strong>exponent form<\/strong>: repeated primes are grouped and raised to a power, so \\(2 \\times 2 \\times 2 \\times 3 \\times 3\\) becomes \\(2^3 \\times 3^2\\). The exponents also let you count divisors: if \\(n = p_1^{a_1} \\times \\cdots \\times p_k^{a_k}\\), then \\(n\\) has exactly \\((a_1+1)(a_2+1)\\cdots(a_k+1)\\) positive divisors. For 360, that is \\(4 \\times 3 \\times 2 = 24\\) divisors.<\/p>\n<p>A classic way to find prime factors by hand is a <strong>factor tree<\/strong>: split the number into any two factors, then keep splitting each branch until only primes remain. The calculator does the same thing systematically, using trial division: it divides by 2 and 3 as often as possible, then tests candidates of the form \\(6k \\pm 1\\) (5, 7, 11, 13, \u2026) up to the square root of what remains. Once no candidate up to \\(\\sqrt{n}\\) divides the remainder, the remainder itself must be prime.<\/p>\n<h2>Assumptions, Limitations, and Tips<\/h2>\n<ul>\n<li><strong>Range:<\/strong> the calculator accepts integers from 2 to 10\u00b9\u00b2. Numbers larger than 10\u00b9\u00b2 exceed what trial division can handle quickly in a browser.<\/li>\n<li><strong>Integers only:<\/strong> decimals and numbers below 2 are rejected \u2014 1 has no prime factors by definition, and primes start at 2.<\/li>\n<li><strong>Primes and prime powers:<\/strong> if you enter a prime such as 97, the result simply says the number is prime. If you enter a prime power such as \\(128 = 2^7\\), you will get a single prime with a large exponent and exactly \\(7 + 1 = 8\\) divisors.<\/li>\n<li><strong>Order doesn't matter:<\/strong> \\(2 \\times 5 \\times 2\\) and \\(2^2 \\times 5\\) are the same factorization; the calculator always lists primes from smallest to largest.<\/li>\n<li><strong>Tip:<\/strong> the number of divisors is handy for puzzle problems (e.g., \"how many rectangular arrays can 360 tiles form?\") and for checking whether a number is a perfect square: a number is a perfect square exactly when every exponent in its factorization is even.<\/li>\n<\/ul>\n<h2>Quick Reference: Common Factorizations<\/h2>\n<table>\n<thead>\n<tr>\n<th>Number<\/th>\n<th>Prime factorization<\/th>\n<th>Distinct primes<\/th>\n<th>Divisors<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>12<\/td>\n<td>\\(2^2 \\times 3\\)<\/td>\n<td>2<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>60<\/td>\n<td>\\(2^2 \\times 3 \\times 5\\)<\/td>\n<td>3<\/td>\n<td>12<\/td>\n<\/tr>\n<tr>\n<td>100<\/td>\n<td>\\(2^2 \\times 5^2\\)<\/td>\n<td>2<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>360<\/td>\n<td>\\(2^3 \\times 3^2 \\times 5\\)<\/td>\n<td>3<\/td>\n<td>24<\/td>\n<\/tr>\n<tr>\n<td>720<\/td>\n<td>\\(2^4 \\times 3^2 \\times 5\\)<\/td>\n<td>3<\/td>\n<td>30<\/td>\n<\/tr>\n<tr>\n<td>1000<\/td>\n<td>\\(2^3 \\times 5^3\\)<\/td>\n<td>2<\/td>\n<td>16<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If you are working on related number theory problems, you may also find our <a href=\"https:\/\/wpcalc.com\/en\/mathematics\/fermats-little-theorem\/\">Fermat's Little Theorem calculator<\/a>, the <a href=\"https:\/\/wpcalc.com\/en\/mathematics\/digital-root-calculator\/\">Digital Root calculator<\/a>, or the <a href=\"https:\/\/wpcalc.com\/en\/mathematics\/division-calculator\/\">Division calculator<\/a> useful for checking your arithmetic along the way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enter any integer from 2 to 1,000,000,000,000 and this calculator instantly finds its prime factorization in exponent form, lists all prime factors, identifies the largest one, and counts the number of divisors.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7],"tags":[72],"class_list":["post-66821","post","type-post","status-publish","format-standard","hentry","category-mathematics","tag-arithmetic-calculators"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=66821"}],"version-history":[{"count":1,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66821\/revisions"}],"predecessor-version":[{"id":67138,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66821\/revisions\/67138"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=66821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=66821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=66821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}