How joulemath calculates
Every number on joulemath is your input, live from a public API, or linked to where it came from. Here is exactly how the calculators work.
Live data
- Difficulty and network hashrate: mempool.space /api/v1/mining/hashrate/3d.
- Reward per block: total reward (subsidy plus fees) averaged over the last 144 blocks, from mempool.space /api/v1/mining/reward-stats/144. If that call fails we fall back to the 3.125 BTC subsidy alone and say so.
- BTC price (USD and EUR): mempool.space /api/v1/prices, with CoinGecko as a fallback.
All requests run in your browser when the page loads. Nothing you type is sent to us or anyone else.
Formulas
- BTC per TH/s per day = 1012 × 86,400 ÷ (difficulty × 232) × reward per block (Bitcoin Wiki: Difficulty).
- Hashprice = BTC per TH/s per day × BTC price.
- Mining revenue per day = TH/s × BTC per TH/s per day × (1 − pool fee) × BTC price.
- Power cost per day = watts ÷ 1,000 × 24 × price per kWh.
- Breakeven power price = daily revenue ÷ daily kWh.
- Hardware payback = hardware cost ÷ daily profit, assuming today's difficulty and price stay flat.
Per-kW comparison
The home calculator works per 1 kW of facility power. With PUE p, 1 kW at the meter leaves 1/p kW for IT load. Mining TH/s per kW = 1,000 ÷ p ÷ J/TH. GPUs per kW = 1,000 ÷ p ÷ watts per GPU. GPU revenue per kW per day = GPUs per kW × rate per GPU-hour × 24 × utilization × (1 − platform overhead). EUR conversion of USD rental rates uses the BTC EUR/USD price ratio.
Full-cost comparison
Both sides use the same facility kW. Per day: net = gross revenue − power − hardware − hosting. Power = kW × 24 × $/kWh. Hosting = kW × $/kW-month × 12 ÷ 365 (optional, default 0).
Buy mode. Mining capex = TH/s × $/TH. GPU capex = GPU count × price per deployed GPU. Hardware per day = capex ÷ (useful life in years × 365). Payback months = capex ÷ ((revenue − power − hosting) × 30.4). Return per $1 = net per day × 365 × life ÷ capex. Useful life defaults (ASIC 3 years, GPU 4 years) are our assumptions.
Rent mode. Mining: you buy hashrate on a market, so cost per day = hashprice × TH/s × (1 + market premium), and the seller pays power and hosting. GPUs: you lease GPUs wholesale for every hour and resell them at the rental rate, so cost per day = GPUs × lease $/hr × 24, while revenue only comes in at your utilization. Lease at the same on-demand price you resell at and you earn about zero or less.
Taxes (optional). Tax per day = your rate × max(0, revenue − power − hosting − depreciation). Straight-line spreads depreciation over the useful life. Year-1 expensing (US Section 179 or bonus depreciation style) deducts the whole price up front, which cuts the effective price by your rate; lifetime tax is the same, payback is shorter. We assume you have income to use the deduction. You enter your own rate; we publish none. Not tax advice.
Default hardware prices (accessed Oct 21, 2026):
- Antminer S21 XP: $4,267.88 ($15.81/TH) on bitmainshop.us, $4,590.88 on its price list; lowest listing $3,428 ($12.70/TH) on Endless Mining.
- 8x H100 SXM HGX server: $289,000 ($36,125/GPU) Vipera listing via GYGO; $250,000 to $320,000, about $285,000 typical, per Mercatus; $295,000 to $320,000 at Gatewell.
- GPU lease: $10.40 to $14.40 per 8x H100 server-hr long-tail 3-year reserved (Mercatus); we default to the top, $1.80/GPU-hr.
- Hashrate market: cheapest Braiins Hashpower ask $37.87/PH/day vs $32.54 hashprice, a 16.4% premium (source).
- Tax references: IRS Notice 2014-21, IRS virtual currency FAQ, IRS Pub 946, HMRC Cryptoassets Manual.
What we leave out
Downtime, curtailment revenue, hardware resale value, financing costs, tax rules beyond the simple model above and future changes in difficulty or price. GPU power and rental rates are left for you to enter because they vary a lot by server build and platform. Reference prices we quote are what renters pay a marketplace, not what a host nets.
See it in action in the calculators, or read the worked example in our profitability guide.
Source code
The site code is open source on GitHub. Spot a data error? Open an issue.