Hash rate is the primary measure of the computational power of a cryptocurrency network or an individual mining rig. It represents the speed at which a computer is completing an operation in the cryptographic code.
Specifically, it measures the number of guesses (hashes) a miner can make per second in an attempt to find the solution to the next block. The calculator below allows you to estimate your "Effective Hash Rate" based on the shares you have submitted to a mining pool over a specific period. This is the math pools use to determine your payout.
Effective Hash Rate Calculator
Calculate your actual mining speed based on shares submitted.
Often 1 for small pools/solo, higher for large pools (VarDiff).
Minutes
Hours
Seconds
Estimated Hash Rate
Raw Speed (H/s):0 H/s
Kilohash (kH/s):0 kH/s
Megahash (MH/s):0 MH/s
Gigahash (GH/s):0 GH/s
Terahash (TH/s):0 TH/s
Total Hashes Performed:0
function calculateHashRate() {
// Get input values
var shares = parseFloat(document.getElementById('shares').value);
var difficulty = parseFloat(document.getElementById('difficulty').value);
var timeValue = parseFloat(document.getElementById('timeValue').value);
var timeUnit = parseFloat(document.getElementById('timeUnit').value);
// Validation
if (isNaN(shares) || isNaN(difficulty) || isNaN(timeValue) || timeValue <= 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
// Calculate total seconds
var totalSeconds = timeValue * timeUnit;
// Constants
// 2^32 is the standard multiplier for difficulty 1 in Bitcoin/SHA-256
var difficultyMultiplier = 4294967296;
// Core Formula: (Shares * Difficulty * 2^32) / Time_in_Seconds
var totalHashes = shares * difficulty * difficultyMultiplier;
var hashesPerSecond = totalHashes / totalSeconds;
// Format results
var kH = hashesPerSecond / 1000;
var MH = hashesPerSecond / 1000000;
var GH = hashesPerSecond / 1000000000;
var TH = hashesPerSecond / 1000000000000;
// Display results
document.getElementById('resHashes').innerText = hashesPerSecond.toLocaleString(undefined, {maximumFractionDigits: 0}) + " H/s";
document.getElementById('resKH').innerText = kH.toLocaleString(undefined, {maximumFractionDigits: 2}) + " kH/s";
document.getElementById('resMH').innerText = MH.toLocaleString(undefined, {maximumFractionDigits: 2}) + " MH/s";
document.getElementById('resGH').innerText = GH.toLocaleString(undefined, {maximumFractionDigits: 4}) + " GH/s";
document.getElementById('resTH').innerText = TH.toLocaleString(undefined, {maximumFractionDigits: 6}) + " TH/s";
document.getElementById('resTotalHashes').innerText = totalHashes.toLocaleString(undefined, {maximumFractionDigits: 0});
// Show container
document.getElementById('results').style.display = 'block';
}
The Math Behind Hash Rate
To understand how hash rate is calculated, one must understand the relationship between difficulty, shares, and probability. Hash rate is not measured directly like the speed of a car; it is inferred statistically based on the work produced (shares).
1. The Basic Formula
Most cryptocurrencies based on Proof of Work (like Bitcoin) utilize a difficulty target. A "share" submitted to a pool proves that you have performed a certain amount of work. The formula to calculate your speed over a specific timeframe is:
H = (S × D × 232) / T
Where:
H = Hash Rate (Hashes per second)
S = Number of Shares found
D = Difficulty of the shares
232 = The baseline probability factor (approx. 4.29 billion hashes to find a difficulty 1 share)
T = Time elapsed in seconds
2. Why 232?
In Bitcoin mining (SHA-256), the difficulty is set such that at Difficulty 1, on average, it takes 232 (or 4,294,967,296) attempts (hashes) to find a valid solution. When you submit a share of Difficulty 1, statistically, you have performed roughly 4.3 billion hashes. If the pool assigns you a higher difficulty (e.g., 2000), each share represents 2000 times that baseline effort.
3. Reported vs. Calculated Hash Rate
Miners often see two different numbers on their dashboard:
Reported Hash Rate: This is the speed your mining software (e.g., CGMiner, PhoenixMiner) tells the pool it is running at. It is a local reading from your GPU or ASIC.
Calculated (Effective) Hash Rate: This is the speed the pool thinks you are running at. It is calculated purely using the formula above based on the number of shares you actually submit.
If you are unlucky and find fewer shares than average in an hour, your calculated hash rate will be lower than your reported rate. Conversely, if you are lucky, it will appear higher.
Hash Rate Unit Conversion Guide
Hash rates have grown exponentially since the inception of Bitcoin. Here is a breakdown of the units used:
Unit
Abbreviation
Hashes Per Second
Typical Device
Hash
H/s
1
Manual calculation
Kilohash
kH/s
1,000
Early CPUs (2009)
Megahash
MH/s
1,000,000
Modern GPUs
Gigahash
GH/s
1,000,000,000
High-end GPU Farms
Terahash
TH/s
1,000,000,000,000
Modern ASIC Miners
Petahash
PH/s
1,000,000,000,000,000
Large Mining Farms
Exahash
EH/s
1,000,000,000,000,000,000
Total Network Power
Understanding these calculations helps miners verify if their equipment is functioning correctly and if the pool is crediting them fairly for their work.