Bitcoin Mining Calculator
Bitcoin mining Calculator
Difficulty Factor | |
Hash Rate |
|
Exchange Rate | ($/BTC) |
BTC / Block | 25.00000000 |
This Difficulty |
||
Coins | Dollars | |
---|---|---|
per Day | ||
per Week | ||
per Month | ||
per Year | ||
this diff (est) | ||
Estimated Difficulty |
||
Coins | Dollars | |
per Day | ||
per Week | ||
per Month | ||
per Year |
jQuery( document ).ready(function($) {
var difficulty = ""; var exchange_rate = "";
$.getJSON( "https://alloscomp.com/bitcoin/calculator/json?hashrate=900000000", function( json ) { difficulty = json['difficulty']; exchange_rate = json['exchange_rate']; $("#difficulty").val( difficulty ); $("#exchange_rate").val( exchange_rate ); });
$( "#btn-calculate" ).click(function() { var cur_difficulty = $("#difficulty").val(); var cur_hash = $("#hashrate").val(); var cur_hashrate_unit = $("#hashrate_unit").val(); var cur_exchange_rate = $("#exchange_rate").val(); var cur_hashrate = 0;
if( cur_hashrate_unit == "mhs"){ cur_hashrate = cur_hash * 1000000; }else if(cur_hashrate_unit == "ghs"){ cur_hashrate = cur_hash * 1000000000; }else if(cur_hashrate_unit == "ths"){ cur_hashrate = cur_hash * 1000000000000; }
$.getJSON( "https://alloscomp.com/bitcoin/calculator/json?hashrate="+cur_hashrate+"&difficulty="+cur_difficulty+"&exchange_rate="+cur_exchange_rate, function( json ) {
var coins_per_hour = json['coins_per_hour']; var dollars_per_hour = json['dollars_per_hour'];
var coins_per_hour_after_retarget = json['coins_per_hour_after_retarget']; var dollars_per_hour_after_retarget = json['dollars_per_hour_after_retarget'];
$("#this-coins-day").html( coins_per_hour * 24 ); $("#this-coins-week").html( coins_per_hour * 24 * 7 ); $("#this-coins-month").html( coins_per_hour * 24 * 30 ); $("#this-coins-year").html( coins_per_hour * 24 * 30 * 12 );
$("#this-dollars-day").html( dollars_per_hour * 24 ); $("#this-dollars-week").html( dollars_per_hour * 24 * 7 ); $("#this-dollars-month").html( dollars_per_hour * 24 * 30 ); $("#this-dollars-year").html( dollars_per_hour * 24 * 30 * 12 );
$("#estimated-coins-day").html( coins_per_hour_after_retarget * 24 ); $("#estimated-coins-week").html( coins_per_hour_after_retarget * 24 * 7 ); $("#estimated-coins-month").html( coins_per_hour_after_retarget * 24 * 30 ); $("#estimated-coins-year").html( coins_per_hour_after_retarget * 24 * 30 * 12 );
$("#estimated-dollars-day").html( dollars_per_hour_after_retarget * 24 ); $("#estimated-dollars-week").html( dollars_per_hour_after_retarget * 24 * 7 ); $("#estimated-dollars-month").html( dollars_per_hour_after_retarget * 24 * 30 ); $("#estimated-dollars-year").html( dollars_per_hour_after_retarget * 24 * 30 * 12 );
});
});
});