body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.ncr-calculator-wrapper {
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 30px;
margin-bottom: 40px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.ncr-header {
text-align: center;
margin-bottom: 25px;
}
.ncr-header h2 {
margin: 0 0 10px 0;
color: #2c3e50;
}
.ncr-row {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-bottom: 20px;
}
.ncr-col {
flex: 1;
min-width: 250px;
}
.ncr-group {
margin-bottom: 15px;
}
.ncr-group label {
display: block;
font-weight: 600;
margin-bottom: 5px;
color: #495057;
}
.ncr-group input, .ncr-group select {
width: 100%;
padding: 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.ncr-group input:focus {
border-color: #4dabf7;
outline: none;
box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}
.ncr-section-title {
font-size: 0.9em;
text-transform: uppercase;
letter-spacing: 1px;
color: #868e96;
border-bottom: 1px solid #dee2e6;
padding-bottom: 5px;
margin-bottom: 15px;
font-weight: bold;
}
.ncr-btn {
display: block;
width: 100%;
padding: 12px;
background-color: #228be6;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s;
}
.ncr-btn:hover {
background-color: #1c7ed6;
}
.ncr-results {
margin-top: 25px;
padding-top: 20px;
border-top: 2px solid #e9ecef;
display: none;
}
.ncr-result-item {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
padding: 10px;
background: #fff;
border-radius: 4px;
border-left: 4px solid #228be6;
}
.ncr-result-label {
font-weight: 600;
color: #495057;
}
.ncr-result-value {
font-weight: bold;
color: #212529;
}
.ncr-main-result {
background-color: #e7f5ff;
border-left-color: #1864ab;
padding: 15px;
font-size: 1.2em;
margin-top: 15px;
}
.ncr-error {
color: #fa5252;
font-weight: bold;
text-align: center;
margin-top: 10px;
display: none;
}
.article-content {
color: #333;
}
.article-content h2 {
color: #2c3e50;
border-bottom: 2px solid #e9ecef;
padding-bottom: 10px;
margin-top: 30px;
}
.article-content h3 {
color: #343a40;
margin-top: 25px;
}
.formula-box {
background: #f1f3f5;
padding: 15px;
border-radius: 5px;
font-family: "Courier New", Courier, monospace;
margin: 15px 0;
border-left: 4px solid #868e96;
}
function calculateNetCountRate() {
// 1. Get input values
var grossCounts = parseFloat(document.getElementById('grossCounts').value);
var grossTime = parseFloat(document.getElementById('grossTime').value);
var bgCounts = parseFloat(document.getElementById('bgCounts').value);
var bgTime = parseFloat(document.getElementById('bgTime').value);
var unit = document.getElementById('timeUnit').value;
// 2. Validation
var errorDiv = document.getElementById('errorMsg');
var resultsDiv = document.getElementById('ncrResults');
if (isNaN(grossCounts) || isNaN(grossTime) || isNaN(bgCounts) || isNaN(bgTime) || grossTime <= 0 || bgTime <= 0) {
errorDiv.style.display = 'block';
resultsDiv.style.display = 'none';
return;
}
errorDiv.style.display = 'none';
resultsDiv.style.display = 'block';
// 3. Calculate Rates
// Rate = Counts / Time
var grossRate = grossCounts / grossTime;
var bgRate = bgCounts / bgTime;
// 4. Calculate Net Rate
var netRate = grossRate – bgRate;
// 5. Calculate Standard Deviation (Uncertainty)
// Formula: σ_net = sqrt( (Rg/tg) + (Rb/tb) )
// Note: Rg/tg is effectively N_g / (t_g^2)
var variance = (grossRate / grossTime) + (bgRate / bgTime);
var stdDev = Math.sqrt(variance);
// 6. Convert to CPM for reference
var netCPM = 0;
if (unit === 'min') {
netCPM = netRate;
} else if (unit === 'sec') {
netCPM = netRate * 60;
} else if (unit === 'hr') {
netCPM = netRate / 60;
}
// 7. Get Unit Label
var unitLabel = "";
if (unit === 'min') unitLabel = "CPM (Counts Per Minute)";
else if (unit === 'sec') unitLabel = "CPS (Counts Per Second)";
else if (unit === 'hr') unitLabel = "CPH (Counts Per Hour)";
// 8. Display Results
document.getElementById('resGrossRate').innerHTML = grossRate.toFixed(2) + " " + unitLabel.split(" ")[0];
document.getElementById('resBgRate').innerHTML = bgRate.toFixed(2) + " " + unitLabel.split(" ")[0];
document.getElementById('resNetRate').innerHTML = netRate.toFixed(2) + " " + unitLabel.split(" ")[0];
document.getElementById('resStdDev').innerHTML = "± " + stdDev.toFixed(2);
document.getElementById('resCPM').innerHTML = netCPM.toFixed(2) + " CPM";
}
Understanding Net Count Rate
In nuclear physics and radiation protection, obtaining an accurate measurement of a radioactive source requires correcting for environmental radiation. This corrected value is known as the Net Count Rate. Every Geiger counter or scintillation detector picks up "background" radiation from cosmic rays, naturally occurring isotopes in the earth, and electronic noise.
To determine the true activity of a specific sample, you must subtract this background activity from your total (gross) measurement. This calculator streamlines that process, providing not just the net rate but also the statistical uncertainty associated with the measurement.
The Formulas
The calculation relies on two separate measurements: one with the sample present (Gross) and one without the sample (Background).
1. Gross and Background Rates
First, convert the raw counts into rates (Counts Per Minute – CPM, or Counts Per Second – CPS) by dividing the total counts ($N$) by the time duration ($t$).
Rg = Ng / tg
Rb = Nb / tb
Where:
- Rg = Gross Count Rate
- Ng = Total Gross Counts
- tg = Time duration of gross measurement
- Rb = Background Count Rate
2. Net Count Rate (Rn)
The net rate is simply the difference between the gross rate and the background rate.
Rn = Rg – Rb
3. Standard Deviation (Uncertainty)
Because radioactive decay is a random process governed by Poisson statistics, there is always an uncertainty in the measurement. The standard deviation ($\sigma$) of the net count rate is calculated as:
σnet = √ [ (Rg / tg) + (Rb / tb) ]
This value helps determine if the detected activity is statistically significant above the background noise.
Example Calculation
Imagine you are testing a soil sample for contamination:
- Background Check: You run the detector for 10 minutes ($t_b$) and detect 300 counts ($N_b$).
- Sample Check: You place the soil sample near the detector, run it for 5 minutes ($t_g$), and detect 2000 counts ($N_g$).
Step 1: Calculate Rates
- Background Rate ($R_b$) = 300 / 10 = 30 CPM
- Gross Rate ($R_g$) = 2000 / 5 = 400 CPM
Step 2: Calculate Net Rate
- Net Rate = 400 – 30 = 370 CPM
This means the soil sample is contributing approximately 370 counts per minute above natural background levels.
Why Measure Background Separately?
Background radiation fluctuates based on location, altitude, and even building materials. Using a generic "average" background value can lead to significant errors, especially when measuring samples with low activity levels. Always perform a background check immediately before or after your sample measurement for the highest accuracy.