Javascript Prime Factorization calculator

This javascript is used to find the prime factors of a given number and also to find the factors of given number.


  • Used to find the prime factors of the given number.
  • This calculator provides factorization even for large numbers.
  • Provides easy accessibility to calculation.


Prime Factor Calculator
Enter the number:
Prime factors are:


Javascript Code

<!-- Script by -->
<!-- More scripts -->
<script type="text/javascript">
function factorise(numm){var newnum = numm;
var newtext = "";var chk = 2;
while (chk*chk <= newnum){ if (newnum % chk == 0){newtext = newtext + chk;
newnum = newnum/chk;
if (newnum != 1){newtext = newtext + "*";
}}if (newnum != 1){
newtext = newtext + newnum;
}if (newtext == "" + numm){
newtext = "Prime Number:"+newtext;

<!-- Script by -->


<table align=center style='border:1px solid green;color: #3D366F;font-size:13px;'>
<form name=frm>
<tr><td>Enter the number:</td><td><input type="text" size="10" name="text1"></td></tr>
<tr><td>Prime factors are:</td><td><input type="text" size="42" name="result"></td></tr>
<tr><td colspan=2 align=center><input type="button" name="button1" value="Prime Factor" onClick="factorise(frm.text1.value)"><a href='' style='text-decoration:none;font-size:10;color:green;'>H</a></td></tr>

  • Release Date - 30-07-2009
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy and paste the javascript code into your HTML page and make use of this calculator.
  • Here,the function "factorise()" provides the prime factorization of the given number.
  • This script calculates dynamically the factors of any given number.


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question