Square Root
You will find many different square roots charts in this page.
Square root calculator
.calculator-container {
background-color: #eee;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
width: 600px;
}
h2 {
color: #4a5568;
text-align: center;
margin-bottom: 20px;
}
.input-section {
display: flex;
margin-bottom: 20px;
justify-content: center;
gap: 10px;
}
input {
padding: 8px 12px;
border: 2px solid #cbd5e0;
border-radius: 4px;
font-size: 16px;
width: 120px;
}
button {
background-color: #4299e1;
color: white;
border: none;
border-radius: 4px;
padding: 8px 16px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s;
}
button:hover {
background-color: #3182ce;
}
.result-section {
display: flex;
gap: 20px;
margin-top: 20px;
}
.factorization {
flex: 1;
border-right: 1px solid #e2e8f0;
padding-right: 20px;
}
.visual {
flex: 1;
padding-left: 20px;
}
.division-table {
border-collapse: collapse;
margin: 0 auto;
width:auto;
}
.division-table td {
padding: 5px 10px;
text-align: center;
border:none;
}
.division-cell {
border-left: 1px solid black !important;
border-bottom: 1px solid black !important;
}
.final-result {
background-color: #e2e8f0;
border-radius: 8px;
padding: 10px;
margin-top: 20px;
text-align: center;
font-weight: bold;
}
.step {
margin-bottom: 8px;
}
.error {
color: #e53e3e;
text-align: center;
margin-top: 10px;
}
.no-bottom-border {
border-bottom: none !important;
}
Square Root Calculator
function calculateSquareRoot() {
// Get input value
const inputElement = document.getElementById('numberInput');
const number = parseInt(inputElement.value);
// Clear previous results
document.getElementById('errorMessage').textContent = '';
// Validate input
if (isNaN(number) || number 1) {
while (num % divisor === 0) {
factors.push(divisor);
num /= divisor;
}
divisor++;
// Optimization for large numbers
if (divisor * divisor > num && num > 1) {
factors.push(num);
break;
}
}
return factors;
}
function generateFactorizationSteps(number, primeFactors) {
const stepsContainer = document.getElementById('steps');
stepsContainer.innerHTML = '';
// Step 1: Show prime factorization
const step1 = document.createElement('div');
step1.className = 'step';
step1.innerHTML = `${number} = ${primeFactors.join(' ?? ')}`;
stepsContainer.appendChild(step1);
// Count occurrences of each prime factor
const factorCounts = {};
for (const factor of primeFactors) {
factorCounts[factor] = (factorCounts[factor] || 0) + 1;
}
// Step 2: Group factors with powers
const step2 = document.createElement('div');
step2.className = 'step';
// For powers of 2, special format
if (primeFactors.length > 0 && primeFactors.every(f => f === 2)) {
step2.innerHTML = `= 2${primeFactors.length}`;
} else {
const powerFactors = [];
for (const factor in factorCounts) {
const count = factorCounts[factor];
if (count > 1) {
powerFactors.push(`${factor}${count}`);
} else {
powerFactors.push(factor);
}
}
step2.innerHTML = '= ' + powerFactors.join(' ?? ');
}
stepsContainer.appendChild(step2);
// Step 3: Arrange for square root
const step3 = document.createElement('div');
step3.className = 'step';
// For powers of 2, special calculation
if (primeFactors.length > 0 && primeFactors.every(f => f === 2)) {
const pairs = Math.floor(primeFactors.length / 2);
const hasRemainder = primeFactors.length % 2 === 1;
if (hasRemainder) {
step3.innerHTML = `= 2${pairs} ?? '2`;
} else {
step3.innerHTML = `= 2${pairs}`;
}
} else {
// Regular calculation for mixed factors
const squareFactors = {};
const remainingFactors = {};
for (const factor in factorCounts) {
const count = factorCounts[factor];
const pairs = Math.floor(count / 2);
const remainder = count % 2;
if (pairs > 0) {
squareFactors[factor] = pairs;
}
if (remainder > 0) {
remainingFactors[factor] = 1;
}
}
if (Object.keys(squareFactors).length > 0) {
const insideStr = Object.keys(squareFactors)
.map(factor => `${factor}${squareFactors[factor]}`)
.join(' ?? ');
step3.innerHTML = `= ${insideStr}${Object.keys(remainingFactors).length > 0 ? ' ?? '' + Object.keys(remainingFactors).join(' ?? ') : ''}`;
} else {
step3.innerHTML = `= '${Object.keys(remainingFactors).join(' ?? ')}`;
}
}
stepsContainer.appendChild(step3);
// Final result
const finalResult = document.getElementById('finalResult');
// For powers of 2, special result display
if (primeFactors.length > 0 && primeFactors.every(f => f === 2)) {
const pairs = Math.floor(primeFactors.length / 2);
const hasRemainder = primeFactors.length % 2 === 1;
const outsideValue = Math.pow(2, pairs);
if (hasRemainder) {
finalResult.innerHTML = `"${number} = ${outsideValue} ?? "2`;
} else {
finalResult.innerHTML = `'${number} = ${outsideValue}`;
}
} else {
// Regular calculation
const squareFactors = {};
const remainingFactors = {};
for (const factor in factorCounts) {
const count = factorCounts[factor];
const pairs = Math.floor(count / 2);
const remainder = count % 2;
if (pairs > 0) {
squareFactors[factor] = pairs;
}
if (remainder > 0) {
remainingFactors[factor] = 1;
}
}
let outsideSqrt = 1;
for (const factor in squareFactors) {
outsideSqrt *= Math.pow(parseInt(factor), squareFactors[factor]);
}
let insideSqrt = 1;
for (const factor in remainingFactors) {
insideSqrt *= parseInt(factor);
}
if (insideSqrt === 1) {
// Perfect square
finalResult.innerHTML = `'${number} = ${outsideSqrt}`;
} else {
finalResult.innerHTML = `"${number} = ${outsideSqrt}${outsideSqrt > 1 ? ' ?? ' : ''}"${insideSqrt}`;
}
}
}
function generateDivisionMethod(number) {
const divisionTable = document.getElementById('divisionTable');
divisionTable.innerHTML = '';
// Get the prime factors using repeated division
const factors = [];
const quotients = [number];
let currentNumber = number;
let divisor = 2;
while (currentNumber > 1) {
if (currentNumber % divisor === 0) {
factors.push(divisor);
currentNumber /= divisor;
quotients.push(currentNumber);
} else {
divisor++;
}
// Optimization for large numbers
if (divisor * divisor > currentNumber && currentNumber > 1) {
factors.push(currentNumber);
quotients.push(1);
break;
}
}
// Create division method visualization
for (let i = 0; i < factors.length; i++) {
const row = document.createElement('tr');
// Divisor cell
const divisorCell = document.createElement('td');
divisorCell.textContent = factors[i];
row.appendChild(divisorCell);
// Number cell
const numberCell = document.createElement('td');
numberCell.className = 'division-cell';
numberCell.textContent = quotients[i];
row.appendChild(numberCell);
divisionTable.appendChild(row);
}
// Add final row with 1
const finalRow = document.createElement('tr');
const emptyCell = document.createElement('td');
finalRow.appendChild(emptyCell);
const oneCell = document.createElement('td');
oneCell.className = 'division-cell no-bottom-border'; // Special class for last cell
oneCell.textContent = quotients[quotients.length - 1];
finalRow.appendChild(oneCell);
divisionTable.appendChild(finalRow);
}
Square roots of perfect squares (1 to 10000)
The chart is designed for students in Grades 6, 7 and 8. From 1 - 10000, it shows all the Square roots of Perfect Squares. We have made them in two colors. You can print them in any size.


Square Roots of Numbers 1 to 30
This chart contains square roots of numbers from 1 to 30. They are arranged in 3 boxes.
Please download the
Understanding Square Roots through Visual Representation
Please