Calculate Yield on Cost

SEO Content Optimization Tool

Characters: 0
Word Count
0
Readability Score
N/A

Top Keyword Density

Keyword Count Density
function updateCounts() { var title = document.getElementById('seo-title').value; var body = document.getElementById('seo-body').value; // Title calculation var titleLen = title.length; var titleBox = document.getElementById('title-count'); titleBox.innerText = 'Characters: ' + titleLen; titleBox.style.color = (titleLen > 60 || titleLen 20) { var sentences = body.split(/[.!?]+/).length; var avgSentence = count / sentences; var score = avgSentence > 20 ? 'Hard' : (avgSentence > 12 ? 'Fair' : 'Easy'); document.getElementById('readability-score').innerText = score; } } function analyzeDensity() { var text = document.getElementById('seo-body').value.toLowerCase(); if (text.length < 10) return; var words = text.replace(/[.,!?;:()]/g, '').split(/\s+/); var stopWords = ['the', 'and', 'a', 'to', 'of', 'in', 'is', 'it', 'with', 'for', 'on', 'that', 'this', 'as', 'are', 'be', 'at', 'or', 'by', 'an']; var freqMap = {}; for (var i = 0; i 3 && stopWords.indexOf(word) === -1) { freqMap[word] = (freqMap[word] || 0) + 1; } } var sorted = []; for (var key in freqMap) { sorted.push([key, freqMap[key]]); } sorted.sort(function(a, b) { return b[1] – a[1]; }); var resultsBody = document.getElementById('density-body'); resultsBody.innerHTML = "; var limit = Math.min(sorted.length, 10); for (var j = 0; j < limit; j++) { var row = resultsBody.insertRow(); var density = ((sorted[j][1] / words.length) * 100).toFixed(2); row.insertCell(0).innerText = sorted[j][0]; row.insertCell(1).innerText = sorted[j][1]; row.insertCell(2).innerText = density + '%'; row.style.borderBottom = '1px solid #eee'; } document.getElementById('density-results').style.display = 'block'; }

Leave a Comment