<meta content="Virtual IP Information Calculator, Palm Springs, California"name=keywords><meta content="The following utility calculates the network and broadcast addresses that a given IP address is associated with."name=description><title>
   IP Address Range Calculator
  </title><script language=JavaScript><!---



function main(calc_data)

{

  var b1, b2, b3, b4, s1, s2, s3, s4, nm1, nm2, nm3, nm4, sn;

  



  validate_octet(calc_data.oct1.value, "Address Octet 1");

  validate_octet(calc_data.oct2.value, "Address Octet 2");

  validate_octet(calc_data.oct3.value, "Address Octet 3");

  validate_octet(calc_data.oct4.value, "Address Octet 4");



  if (calc_data.MODE[0].checked)

  {

    validate_octet(calc_data.sm1.value, "Subnet Mask octet 1");

    validate_octet(calc_data.sm2.value, "Subnet Mask octet 2");

    validate_octet(calc_data.sm3.value, "Subnet Mask octet 3");

    validate_octet(calc_data.sm4.value, "Subnet Mask octet 4");

 

    nm1 = calc_data.sm1;

    nm2 = calc_data.sm2;

    nm3 = calc_data.sm3;

    nm4 = calc_data.sm4;



    s1 = (calc_data.oct1.value & 0xFF) & (nm1.value & 0xFF); 

    s2 = (calc_data.oct2.value & 0xFF) & (nm2.value & 0xFF); 

    s3 = (calc_data.oct3.value & 0xFF) & (nm3.value & 0xFF); 

    s4 = (calc_data.oct4.value & 0xFF) & (nm4.value & 0xFF); 



    b1 = (calc_data.oct1.value & 0xFF) | (~nm1.value & 0xFF); 

    b2 = (calc_data.oct2.value & 0xFF) | (~nm2.value & 0xFF); 

    b3 = (calc_data.oct3.value & 0xFF) | (~nm3.value & 0xFF); 

    b4 = (calc_data.oct4.value & 0xFF) | (~nm4.value & 0xFF); 



  }

  

  sn = 0;

  if (calc_data.MODE[1].checked)

  {

    for (i=1;i<=calc_data.pf.value;i++)

    {

      sn = sn >>> 1;  

      sn = sn + 0x80000000;

    }  

    

    nm4 = sn & 0xFF;

    nm3 = (sn >> 8) & 0xFF;

    nm2 = (sn >> 16) & 0xFF;

    nm1 = (sn >> 24) & 0xFF;



    s1 = (calc_data.oct1.value & 0xFF) & (nm1 & 0xFF); 

    s2 = (calc_data.oct2.value & 0xFF) & (nm2 & 0xFF); 

    s3 = (calc_data.oct3.value & 0xFF) & (nm3 & 0xFF); 

    s4 = (calc_data.oct4.value & 0xFF) & (nm4 & 0xFF); 



    b1 = (calc_data.oct1.value & 0xFF) | (~nm1 & 0xFF); 

    b2 = (calc_data.oct2.value & 0xFF) | (~nm2 & 0xFF); 

    b3 = (calc_data.oct3.value & 0xFF) | (~nm3 & 0xFF); 

    b4 = (calc_data.oct4.value & 0xFF) | (~nm4 & 0xFF); 

  }



  calc_data.na1.value = s1;

  calc_data.na2.value = s2;

  calc_data.na3.value = s3;

  calc_data.na4.value = s4;



  calc_data.fa1.value = s1;

  calc_data.fa2.value = s2;

  calc_data.fa3.value = s3;

  calc_data.fa4.value = s4 + 1;



  calc_data.bm1.value = b1;

  calc_data.bm2.value = b2;

  calc_data.bm3.value = b3;

  calc_data.bm4.value = b4;



  calc_data.la1.value = b1;

  calc_data.la2.value = b2;

  calc_data.la3.value = b3;

  calc_data.la4.value = b4 - 1;

}



function validate_octet(octet, text_message)

{

  if ((octet < 0) || (octet > 255))

    alert(text_message + ' value must be in the range 0 - 255');

}



//--></script><script language=JavaScript><!-- hide from non-scriptable browsers



// JavaScript sees numbers with leading zeros as octal values, so strip zeros

function stripZeros(inputStr) {

	var result = inputStr

	while (result.substring(0,1) == "0") {

		result = result.substring(1,result.length)

	}

	return result

}



// general purpose function to see if an input value has been entered at all

function isEmpty(inputStr) {

	if (inputStr == "" || inputStr == null) {

		return true

	}

	return false

}



// general purpose function to see if a suspected numeric input

// is a positive integer

function isNumber(inputStr) {

	for (var i = 0; i < inputStr.length; i++) {

		var oneChar = inputStr.substring(i, i + 1)

		if (oneChar < "0" || oneChar > "9") {

			return false

		}

	}

	return true

}



// function to determine if value is in acceptable range for this application

function inRange(inputStr) {

	num = parseInt(inputStr)

	if ((num < 0) || (num > 255)) {

		return false

	}

	return true

}



function isValid(inputStr) {

	if (isEmpty(inputStr)) {

		alert("Please enter a number")

		return false

	} else {

		if (!isNumber(inputStr)) {

			alert("Please enter numbers only")

			return false

		} else {

			if (!inRange(inputStr)) {

				alert("Valid range is 0 - 255")

				return false

			}

		}

	}

	return true

}



function allDone(form) {

  var inputStr1 = form.entry1.value

  var inputStr2 = form.entry2.value

  var inputStr3 = form.entry3.value

  var inputStr4 = form.entry4.value



  var doneVal

  var ok2Cont   = true



	if ( isEmpty(inputStr1) || isEmpty(inputStr2) ||

	   isEmpty(inputStr3) || isEmpty(inputStr4) ) {

     ok2Cont = false ;

     alert("All fields need to be filled in")	;

	}



  if (ok2Cont) {

     form.octet1.value = toBin(inputStr1)

     form.octet2.value = toBin(inputStr2)

     form.octet3.value = toBin(inputStr3)

     form.octet4.value = toBin(inputStr4)



     // Concatenate binary characters

     doneVal = toBin(inputStr1) + toBin(inputStr2) + toBin(inputStr3) + toBin(inputStr4) ;



     form.all4.value = doneVal



     // strip any leading zero

     doneVal = stripZeros(doneVal) ;



     // convert binary to decimal

     form.result.value = "HTTP://" + parseInt(doneVal, 2) ;

  } else {

     form.octet1.value = ""

     form.octet2.value = ""

     form.octet3.value = ""

     form.octet4.value = ""

     form.result.value = ""

  }

}





// Decimal to binary, returns an eight character string

function toBin(inVal) {

   base = 2 ;

   num = parseInt(inVal);

   binNum = num.toString(base);

   // pad leading spaces with "0"

   binNum = padTextPrefix(binNum, "0", 8) ;



   return binNum

}



// equiv to padl()

function padTextPrefix (InString, PadChar, DefLength)  {

   if (InString.length >= DefLength)

      return (InString);

   OutString = InString

   for (Count = InString.length; Count < DefLength; Count++)  {

      OutString = PadChar + OutString;

   }

   return (OutString);

}



// end hiding --></script><body bgcolor=FFFFFF link=0000FF text=000000 vlink=800080><font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular> <script async src=//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js></script> <style><!--
body { font-family: Tahoma, Verdana; }
input.btn {
  color:black;
  font: bold 75% 'tahoma',helvetica,sans-serif;
  background-color:#ffd148;
  border: 2px solid;
  border-color: #c7c5c8;
 }
 
 input.btn2 {
  color:black;
  font: bold 95% 'tahoma',helvetica,sans-serif;
  background-color:#ffd148;
  border: 2px solid;
  border-color: #c7c5c8;
 
}
//--></style> <meta content=width=958,initial-scale=1 name=viewport> <div align=center><table bgcolor=#899194 border=0 cellpadding=0 cellspacing=0 width=949><tbody><tr><td colspan=13><div align=left><img alt="CSGNetwork.com Free Information"height=37 src=http://storage.googleapis.com/csgnetworkstatic/allbar_header.png width=950></div><tr valign=middle><td><div align=left style=float:left;><form action=http://www.csgnetwork.com/search_frame.html id=cse-search-box><div><input name=cx type=hidden value=partner-pub-8018289210612122:1424138921><input name=cof type=hidden value=FORID:10><input name=ie type=hidden value=UTF-8><input name=q size=55><input class=btn name=sa type=submit value=Search></div></form></div> <div style="float:right; margin-right:40px;"align=center><span style="decoration:none; color:white; font-weight:bold; font-size:smaller;"> <a style="decoration:none; color:white;"href=http://www.csgnetwork.com> <b> Home </b> </a> | <a style="decoration:none; color:white;"href=http://www.csgnetwork.com/top_free_apps.html> <b> Top Free Apps </b> </a> | <br> <a style="decoration:none; color:white;"href=http://www.csgnetwork.com/converters.html> <b> CALCULATORS and CONVERTERS </b> </a> | <a style="decoration:none; color:white;"href=# onclick=history.go(-1)> <b> Back </b> </a> </span></div></table></div> <br> <div align=center><ins class=adsbygoogle data-ad-client=ca-pub-8018289210612122 data-ad-slot=1330314354 style=display:inline-block;width:728px;height:15px> </ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div> <table align=center border=0 cellpadding=5 width=950><tbody><tr><td width=80%><h1>IP Address Range Calculator</h1> <center> <table align=MIDDLE border=5 cellpadding=5><tbody><tr bgcolor=#FFFFFF><td valign=top> <ins class=adsbygoogle data-ad-client=ca-pub-8018289210612122 data-ad-slot=9580710129 style=display:inline-block;width:160px;height:600px> </ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script><td bgcolor=#B6D4D2 width=80%>This <a href=http://www.csgnetwork.com/glossaryc.html#calculator target=blank> <b> calculator </b> </a> requires the use of <a href=http://www.csgnetwork.com/glossaryj.html#Javascript target=blank> <b> Javascript </b> </a> enabled and capable browsers. The following utility calculates the network and broadcast addresses that a given IP address is associated with. The calculations are based on RFC 1219 compliant addresses. A maximum of three decimal characters (0-9) per box with a decimal value of between 0 (zero) and 255 is required. If the value is 0, please put in a 0. The network prefix length is assumed in hex; a maximum of 2 hex characters are allowed. <br> <br> <center> <table align=MIDDLE border=5 cellpadding=5><tbody><tr bgcolor=#FFFFFF><td width=80%><br> <br> <form name=addressIP><center> <table align=MIDDLE border=5 cellpadding=5><tbody><tr bgcolor=#B6D4D2><td align=center colspan=2>Required Data Entry<tr><td>Specify A Network Address<td><input maxlength=3 name=oct1 size=3> <b> . </b> <input maxlength=3 name=oct2 size=3> <b> . </b> <input maxlength=3 name=oct3 size=3> <b> . </b> <input maxlength=3 name=oct4 size=3><tr bgcolor=#B6D4D2><td align=center colspan=2>Please Select One Of The Following Methods<tr><td><input checked name=MODE type=radio> A Subnet Mask<td><input maxlength=3 name=sm1 size=3> <b> . </b> <input maxlength=3 name=sm2 size=3> <b> . </b> <input maxlength=3 name=sm3 size=3> <b> . </b> <input maxlength=3 name=sm4 size=3><tr><td><input name=MODE type=radio> A Network Prefix Length<td><input maxlength=2 name=pf size=3><tr><td align=center bgcolor=#B6D4D2 colspan=2><input value="Calculate Network Information"onclick=main(addressIP) type=button>    <input value="Clear Values"type=reset> <br> <hr style="background:#ffd148; border:0; height:5px">  <ins class=adsbygoogle data-ad-client=ca-pub-8018289210612122 data-ad-slot=3586924021 style=display:inline-block;width:300px;height:250px> </ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script> <hr style="background:#ffd148; border:0; height:5px"><tr bgcolor=#B6D4D2><td align=center colspan=2>Calculated Results<tr><td>Network Address<td><input name=na1 size=3> <b> . </b> <input name=na2 size=3> <b> . </b> <input name=na3 size=3> <b> . </b> <input name=na4 size=3><tr><td>Address Of First Host<td><input name=fa1 size=3> <b> . </b> <input name=fa2 size=3> <b> . </b> <input name=fa3 size=3> <b> . </b> <input name=fa4 size=3><tr><td>Address Of Last Host<td><input name=la1 size=3> <b> . </b> <input name=la2 size=3> <b> . </b> <input name=la3 size=3> <b> . </b> <input name=la4 size=3><tr><td>Broadcast Address<td><input name=bm1 size=3> <b> . </b> <input name=bm2 size=3> <b> . </b> <input name=bm3 size=3> <b> . </b> <input name=bm4 size=3></table> </center></form></table> <center> Version 1.1.1 </center> </center></table> </center> <br> <br>   <link href=http://www.csgnetwork.com/Icons/thumb_information.png rel=image_src> <link href=http://www.csgnetwork.com/Icons/thumb_calculator.png rel=image_src></table> <div style=clear:both;></div> <div align=center><table bgcolor=#FFFFFF border=0 width=750><tbody><tr><td><div style=float:left;font-size:smaller;margin-left:70px;>Leave us a question or comment on <a href=http://www.facebook.com/pages/CSGNetworkcom-Free-Apps/139436549442339 target=_blank> Facebook <img border=0 height=20 src=http://storage.googleapis.com/csgnetworkstatic/facebook-icon.png width=20> </a></div><tr valign=middle><td><td bgcolor=#999DA8 colspan=2><div style="font-size:14pt; color:#FFFFFF;"align=center><b> Search or Browse Our Site </b></div><tr><td><div align=center><script async src=//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js></script><ins class=adsbygoogle data-ad-client=ca-pub-8018289210612122 data-ad-slot=3358458988 style=display:inline-block;width:336px;height:280px> </ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div><td bgcolor=ffffff valign=top><div align=center><table bgcolor=FFFFFF border=0 cellpadding=4 width=70%><tbody><tr><td colspan=3><div align=center><form action=http://www.csgnetwork.com/search_frame.html id=cse-search-box><div><input name=cx type=hidden value=partner-pub-8018289210612122:li00ja-20in><input name=cof type=hidden value=FORID:10><input name=ie type=hidden value=ISO-8859-1><input name=q size=40><input class=btn2 name=sa type=submit value=Search width=40></div></form><script async src=http://www.google.com/cse/brand?form=cse-search-box&lang=en></script></div><tr bgcolor=FFFFFF valign=top><td><span style=font-size:smaller;> <a href=http://www.csgnetwork.com/automotiveconverters.html> <b> Automotive </b> </a> <br> <a href=http://www.csgnetwork.com/aviationconverters.html> <b> Aviation </b> </a> <br> <a href=http://www.csgnetwork.com/financialconverters.html> <b> Business </b> </a> <br> <a href=http://www.csgnetwork.com/communicateconverters.html> <b> Communications </b> </a> <br> <a href=http://www.csgnetwork.com/computerconverters.html> <b> Computer </b> </a> <br> <a href=http://www.csgnetwork.com/constructionconverters.html> <b> Construction </b> </a> <br> <a href=http://www.csgnetwork.com/electronicsconverters.html> <b> Electronics </b> </a> <br> <a href=http://www.csgnetwork.com/everydayconverters.html> <b> Everyday Use </b> </a> <br> <a href=http://www.csgnetwork.com/financialconverters.html> <b> Financial </b> </a> <br> <a href=http://www.csgnetwork.com/generalconverters.html> <b> General Interest </b> </a> <br> <a href=http://www.csgnetwork.com/geographyconverters.html> <b> Geography Related </b> </a> <br> <a href=http://www.csgnetwork.com/healthconverters.html> <b> Health </b> </a> </span><td width=125><span style=font-size:smaller;> <a href=http://www.csgnetwork.com/constructionconverters.html> <b> Home Repair </b> </a> <br> <a href=http://www.csgnetwork.com/sssconverters.html> <b> Javascript </b> </a> <br> <a href=http://www.csgnetwork.com/lotterycalcs.html> <b> Lottery </b> </a> <br> <a href=http://www.csgnetwork.com/marineconverters.html> <b> Marine </b> </a> <br> <a href=http://www.csgnetwork.com/mathhelpconverters.html> <b> Math Help </b> </a> <br> <a href=http://www.csgnetwork.com/mathconverters.html> <b> Math Scripts </b> </a> <br> <a href=http://www.csgnetwork.com/automotiveconverters.html> <b> Mechanical </b> </a> <br> <a href=http://www.csgnetwork.com/financialconverters.html> <b> Money </b> </a> <br> <a href=http://www.csgnetwork.com/scienceconverters.html> <b> Science </b> </a> <br> <a href=http://www.csgnetwork.com/sportsconverters.html> <b> Sports </b> </a> <br> <a href=http://www.csgnetwork.com/timeconverters.html> <b> Time </b> </a> <br> <a href=http://www.csgnetwork.com/weatherconverters.html> <b> Weather </b> </a> </span></table></div><tr><td colspan=4><div align=center><img alt="Free Information Calculators and Converters"src=http://storage.googleapis.com/csgnetworkstatic/allbottom.png></div></table><br><div align=center><table border=0 cellpadding=0 cellspacing=0 width=950><tbody><tr><td><td align=left valign=middle><img alt="International Copyright Violation"border=0 height=16 src=http://storage.googleapis.com/csgnetworkstatic/cslogo.png width=234></table></div><div align=center><table border=0 cellpadding=0 cellspacing=0 width=950><tbody><tr><td><script language=JavaScript><!--
    today=new Date();
    y0=today.getFullYear();//  ---></script> <div align=center style=font-size:x-small>Registered® Trademark™ and Copyright© 1973 - <script language=JavaScript><!--- 
    document.write(y0);
 // ---></script><a href=http://www.csgnetwork.com/> CSG, Computer Support Group, Inc. and CSGNetwork.Com </a> All Rights Reserved</div> <br></table><font size=3> <div align=center><a href=http://www.csgnetwork.com/> Home </a> | <a href=http://www.csgnetwork.com/advertising.html rel=nofollow> Advertising </a> | <a href=http://www.csgnetwork.com/converters.html> Calculators and Converters </a> | <a href=http://www.csgnetwork.com/contact.html> Contact Us </a> | <a href=http://www.csgnetwork.com/sssconverters.html> Javascript </a> | <a href=http://www.csgnetwork.com/sitemap.html> Sitemap </a> | <a href=http://www.csgnetwork.com/glossary.html> Glossary </a> | <a href=http://www.csgnetwork.com/top_free_apps.html> Top Free Apps </a></div> </font><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-586965-1', 'auto');
  ga('send', 'pageview');</script></div></div> </font>