Target

The number you need to get below to mine a block

Diagram showing the block hash of a candidate block trying to get below a target value.
Current Target:
Height: 840,691 (the upcoming block)
0000000000000000000331db0000000000000000000000000000000000000000

The target is a number that a block hash for a candidate block must get below before the block can be added on to the blockchain.

It is used during the process of mining.

The target adjusts every 2016 blocks (roughly two weeks) to try and ensure that blocks are mined once every 10 minutes on average. This creates a consistent time between blocks, and a consistent issuance of new bitcoins (via the block reward).

To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases.
Satoshi Nakamoto, Bitcoin Whitepaper

Period

When does the target adjust?

The target adjusts every 2016 blocks.

This is roughly every two weeks.

Blocks are mined roughly every 10 minutes, and there are 20,160 minutes in two weeks.

History

Here are the block heights and target values for every target adjustment in Bitcoin's history:

Height Target Adjustment* Time
842688 Next adjustment in 1997 blocks ()    
840672 0000000000000000000331db0000000000000000000000000000000000000000 x 0.98052723517649
838656 0000000000000000000342190000000000000000000000000000000000000000 x 0.96224544516397
836640 0000000000000000000362d30000000000000000000000000000000000000000 x 1.0098754420057
834624 000000000000000000035a590000000000000000000000000000000000000000 x 0.94524360551651
832608 000000000000000000038c120000000000000000000000000000000000000000 x 1.0299185248524
830592 0000000000000000000371b10000000000000000000000000000000000000000 x 0.92385302700999
828576 00000000000000000003ba5d0000000000000000000000000000000000000000 x 0.93167552643822
826560 00000000000000000004005a0000000000000000000000000000000000000000 x 1.0405739477558
824544 00000000000000000003d8690000000000000000000000000000000000000000 x 0.98372231915965
822528 00000000000000000003e8b30000000000000000000000000000000000000000 x 0.93472446719622
820512 000000000000000000042e950000000000000000000000000000000000000000 x 1.0096853816681
818496 0000000000000000000424500000000000000000000000000000000000000000 x 0.95174648144122
816480 000000000000000000045a120000000000000000000000000000000000000000 x 0.96575194029446
814464 0000000000000000000481940000000000000000000000000000000000000000 x 0.9770619588485
812448 000000000000000000049ca90000000000000000000000000000000000000000 x 0.9392244419792
810432 00000000000000000004e90f0000000000000000000000000000000000000000 x 0.9964823513747
808416 00000000000000000004ed7f0000000000000000000000000000000000000000 x 0.94800883007392
806400 0000000000000000000532ae0000000000000000000000000000000000000000 x 1.0271707830408
804384 000000000000000000050f7b0000000000000000000000000000000000000000 x 0.94192410484789
802368 000000000000000000055f5b0000000000000000000000000000000000000000 x 0.99880004765768
800352 0000000000000000000561020000000000000000000000000000000000000000 x 1.0302486526929
798336 0000000000000000000538940000000000000000000000000000000000000000 x 0.93943803504456
796320 000000000000000000058ebe0000000000000000000000000000000000000000 x 1.0336497665773
794304 00000000000000000005606d0000000000000000000000000000000000000000 x 0.97868020586544
792288 000000000000000000057e690000000000000000000000000000000000000000 x 0.96711901193182
790272 00000000000000000005ae3a0000000000000000000000000000000000000000 x 0.96883596134878
788256 00000000000000000005dd010000000000000000000000000000000000000000 x 1.0147247947481
786240 00000000000000000005c7390000000000000000000000000000000000000000 x 0.9830712197756
784224 00000000000000000005e0b20000000000000000000000000000000000000000 x 0.97819142182381
782208 00000000000000000006023e0000000000000000000000000000000000000000 x 0.9297301636395
780192 0000000000000000000676810000000000000000000000000000000000000000 x 0.98856812097533
778176 0000000000000000000689a30000000000000000000000000000000000000000 x 0.90947511871228
776160 0000000000000000000730390000000000000000000000000000000000000000 x 1.004968342549
774144 0000000000000000000727200000000000000000000000000000000000000000 x 0.95526183867852
772128 000000000000000000077ce20000000000000000000000000000000000000000 x 0.90697416524044
770112 00000000000000000008417e0000000000000000000000000000000000000000 x 1.0372649611975
768096 00000000000000000007f5900000000000000000000000000000000000000000 x 0.96833694715894
766080 0000000000000000000838300000000000000000000000000000000000000000 x 1.0790251211387
764064 000000000000000000079e150000000000000000000000000000000000000000 x 0.99490412094592
762048 00000000000000000007a8120000000000000000000000000000000000000000 x 1.0019988937192
760032 00000000000000000007a4290000000000000000000000000000000000000000 x 0.96674723263617
758016 00000000000000000007e7720000000000000000000000000000000000000000 x 0.88064725623336
756000 00000000000000000008f9ae0000000000000000000000000000000000000000 x 1.0218367162582
753984 00000000000000000008c8940000000000000000000000000000000000000000 x 0.96666263635875
751968 0000000000000000000916200000000000000000000000000000000000000000 x 0.91524548439056
749952 00000000000000000009ed880000000000000000000000000000000000000000 x 0.99375914515868
747936 00000000000000000009fd7e0000000000000000000000000000000000000000 x 0.98288886620348
745920 0000000000000000000a2a040000000000000000000000000000000000000000 x 1.0527300628525
743904 00000000000000000009a7af0000000000000000000000000000000000000000 x 1.0143166297971
741888 0000000000000000000984cc0000000000000000000000000000000000000000 x 1.0241163626812
739872 000000000000000000094b6a0000000000000000000000000000000000000000 x 0.98725753332296
737856 000000000000000000096a200000000000000000000000000000000000000000 x 1.0452778916624
735840 0000000000000000000901ba0000000000000000000000000000000000000000 x 0.95338744195437
733824 0000000000000000000972750000000000000000000000000000000000000000 x 0.9473565824929
731808 00000000000000000009f8d90000000000000000000000000000000000000000 x 1.0127977237471
729792 00000000000000000009d8970000000000000000000000000000000000000000 x 0.96031616106296
727776 0000000000000000000a40c00000000000000000000000000000000000000000 x 1.0035560932261
725760 0000000000000000000a37730000000000000000000000000000000000000000 x 1.0151294164736
723744 0000000000000000000a10780000000000000000000000000000000000000000 x 0.95435261979037
721728 0000000000000000000a8bb40000000000000000000000000000000000000000 x 0.99822633573674
719712 0000000000000000000a90800000000000000000000000000000000000000000 x 0.91475078447564
717696 0000000000000000000b8c8b0000000000000000000000000000000000000000 x 0.99591567661738
715680 0000000000000000000b98ab0000000000000000000000000000000000000000 x 0.99682580905799
713664 0000000000000000000ba21f0000000000000000000000000000000000000000 x 0.92314091115484
711648 0000000000000000000c9a130000000000000000000000000000000000000000 x 1.0151546439906
709632 0000000000000000000c69ea0000000000000000000000000000000000000000 x 0.95524403431874
707616 0000000000000000000cfecf0000000000000000000000000000000000000000 x 0.92719610336448
705600 0000000000000000000e04080000000000000000000000000000000000000000 x 0.99056813353435
703584 0000000000000000000e26320000000000000000000000000000000000000000 x 0.9549890987212
701568 0000000000000000000ed0eb0000000000000000000000000000000000000000 x 0.96933912349007
699552 0000000000000000000f48e40000000000000000000000000000000000000000 x 0.95655080213904
697536 0000000000000000000ffaa00000000000000000000000000000000000000000 x 0.88311464889193
695520 00000000000000000012180b0000000000000000000000000000000000000000 x 0.93188194410609
693504 000000000000000000136aa20000000000000000000000000000000000000000 x 0.94316891449173
691488 0000000000000000001496240000000000000000000000000000000000000000 x 1.0504974686639
689472 0000000000000000001398ce0000000000000000000000000000000000000000 x 1.3877849612019
687456 0000000000000000000e1ef90000000000000000000000000000000000000000 x 1.055934943765
685440 0000000000000000000d5f7b0000000000000000000000000000000000000000 x 1.1899851864726
683424 0000000000000000000b3ce90000000000000000000000000000000000000000 x 0.82282378571628
681408 0000000000000000000da8630000000000000000000000000000000000000000 x 1.1442650279267
679392 0000000000000000000bef930000000000000000000000000000000000000000 x 0.98114909138345
677376 0000000000000000000c2a480000000000000000000000000000000000000000 x 0.94502928413015
675360 0000000000000000000cdf6f0000000000000000000000000000000000000000 x 0.98091609266503
673344 0000000000000000000d1f8c0000000000000000000000000000000000000000 x 1.0128615053414
671328 0000000000000000000cf4e30000000000000000000000000000000000000000 x 0.9866628088975
669312 0000000000000000000d21b90000000000000000000000000000000000000000 x 0.97150072190796
667296 0000000000000000000d84570000000000000000000000000000000000000000 x 0.98962170036542
665280 0000000000000000000da8a10000000000000000000000000000000000000000 x 0.90256784103524
663264 0000000000000000000f22170000000000000000000000000000000000000000 x 1.003794465283
661248 0000000000000000000f13720000000000000000000000000000000000000000 x 1.0260836512958
659232 0000000000000000000eb1560000000000000000000000000000000000000000 x 0.91854982185188
657216 0000000000000000000ffedd0000000000000000000000000000000000000000 x 0.95402451576852
655200 00000000000000000010c4330000000000000000000000000000000000000000 x 1.1911840909929
653184 0000000000000000000e134e0000000000000000000000000000000000000000 x 0.96503290196366
651168 0000000000000000000e95de0000000000000000000000000000000000000000 x 1.0008585937909
649152 0000000000000000000e92aa0000000000000000000000000000000000000000 x 0.89807436606792
647136 000000000000000000103a120000000000000000000000000000000000000000 x 1.0122215643983
645120 0000000000000000001007ea0000000000000000000000000000000000000000 x 0.96524712704929
643104 000000000000000000109bac0000000000000000000000000000000000000000 x 0.99408532620211
641088 00000000000000000010b4f80000000000000000000000000000000000000000 x 1.0295821598672
639072 000000000000000000103a150000000000000000000000000000000000000000 x 0.90996564456025
637056 00000000000000000011d5190000000000000000000000000000000000000000 x 1.0000333725247
635040 00000000000000000011d4f20000000000000000000000000000000000000000 x 0.86997621502511
633024 000000000000000000147f350000000000000000000000000000000000000000 x 1.1023634647737
631008 0000000000000000001297f60000000000000000000000000000000000000000 x 1.0638632234475
628992 000000000000000000117a390000000000000000000000000000000000000000 x 0.99092474982503
626976 00000000000000000011a3330000000000000000000000000000000000000000 x 0.92208375479832
624960 0000000000000000001320bc0000000000000000000000000000000000000000 x 0.94545169316587
622944 000000000000000000143b410000000000000000000000000000000000000000 x 1.1897858295951
620928 0000000000000000001101190000000000000000000000000000000000000000 x 0.93559986567039
618912 000000000000000000122cbc0000000000000000000000000000000000000000 x 1.0038634118714
616896 000000000000000000121ad40000000000000000000000000000000000000000 x 0.99481262309225
614880 0000000000000000001232ff0000000000000000000000000000000000000000 x 0.95540366043564
612864 000000000000000000130c780000000000000000000000000000000000000000 x 0.93384140548676
610848 0000000000000000001465f20000000000000000000000000000000000000000 x 0.93838656962836
608832 00000000000000000015bcd00000000000000000000000000000000000000000 x 0.99445875479048
606816 00000000000000000015dbd20000000000000000000000000000000000000000 x 1.0074858321975
604800 00000000000000000015b23e0000000000000000000000000000000000000000 x 0.98048052914336
602784 0000000000000000001620d10000000000000000000000000000000000000000 x 1.0763737711489
600768 000000000000000000148edf0000000000000000000000000000000000000000 x 0.950086596205
598752 00000000000000000015a35c0000000000000000000000000000000000000000 x 0.9809140134526
596736 000000000000000000160f240000000000000000000000000000000000000000 x 0.93187799779418
594720 00000000000000000017abf50000000000000000000000000000000000000000 x 0.90592579269653
592704 0000000000000000001a213e0000000000000000000000000000000000000000 x 0.94536683874266
590688 0000000000000000001ba3d10000000000000000000000000000000000000000 x 0.98054297148406
588672 0000000000000000001c30390000000000000000000000000000000000000000 x 0.90270133185306
586656 0000000000000000001f3a080000000000000000000000000000000000000000 x 1.0055884259193
584640 0000000000000000001f0d9b0000000000000000000000000000000000000000 x 0.87539423085195
582624 00000000000000000023792c0000000000000000000000000000000000000000 x 0.93379546859479
580608 00000000000000000025fd030000000000000000000000000000000000000000 x 1.0067861738532
578592 00000000000000000025bb760000000000000000000000000000000000000000 x 0.8987827940309
576576 00000000000000000029fb450000000000000000000000000000000000000000 x 0.99963267245865
574560 00000000000000000029ff380000000000000000000000000000000000000000 x 0.94790652469426
572544 0000000000000000002c4e110000000000000000000000000000000000000000 x 1.0062951301464
570528 0000000000000000002c071d0000000000000000000000000000000000000000 x 0.99784792511347
568512 0000000000000000002c1f6c0000000000000000000000000000000000000000 x 0.95134645013622
566496 0000000000000000002e61170000000000000000000000000000000000000000 x 1.0004868283152
564480 0000000000000000002e5b500000000000000000000000000000000000000000 x 0.99829916325141
562464 0000000000000000002e6f880000000000000000000000000000000000000000 x 0.95927474581587
560448 0000000000000000003068350000000000000000000000000000000000000000 x 1.011922704334
558432 0000000000000000002fd6330000000000000000000000000000000000000000 x 0.95489580151009
556416 0000000000000000003218a50000000000000000000000000000000000000000 x 0.90884325230511
554400 000000000000000000371ef40000000000000000000000000000000000000000 x 1.1057454376266
552384 00000000000000000031d97c0000000000000000000000000000000000000000 x 1.1783257656283
550368 0000000000000000002a4e2f0000000000000000000000000000000000000000 x 1.0798252822708
548352 000000000000000000272d920000000000000000000000000000000000000000 x 0.99978388902409
546336 000000000000000000272fbd0000000000000000000000000000000000000000 x 1.0378841611148
544320 00000000000000000025c1910000000000000000000000000000000000000000 x 0.95944512839403
542304 000000000000000000275a1f0000000000000000000000000000000000000000 x 0.98134475595709
540288 0000000000000000002819a10000000000000000000000000000000000000000 x 0.95840355119744
538272 00000000000000000029d72d0000000000000000000000000000000000000000 x 0.94976999243872
536256 0000000000000000002c0da70000000000000000000000000000000000000000 x 0.93115390582089
534240 0000000000000000002f4f7b0000000000000000000000000000000000000000 x 0.87044719451702
532224 000000000000000000365a170000000000000000000000000000000000000000 x 1.035724878051
530208 000000000000000000347a280000000000000000000000000000000000000000 x 0.94664493245494
528192 000000000000000000376f560000000000000000000000000000000000000000 x 0.97305875423757
526176 00000000000000000038f8410000000000000000000000000000000000000000 x 0.87172775419203
524160 000000000000000000415a490000000000000000000000000000000000000000 x 0.96213768087455
522144 00000000000000000043eca90000000000000000000000000000000000000000 x 0.97060259384261
520128 00000000000000000045fb530000000000000000000000000000000000000000 x 0.95456499066211
518112 00000000000000000049500d0000000000000000000000000000000000000000 x 0.91450136710181
516096 000000000000000000502ab70000000000000000000000000000000000000000 x 0.98618133724066
514080 000000000000000000514a490000000000000000000000000000000000000000 x 0.95034388521164
512064 0000000000000000005589a30000000000000000000000000000000000000000 x 0.91393010184351
510048 0000000000000000005d97dc0000000000000000000000000000000000000000 x 0.95587206758167
508032 00000000000000000061e9f80000000000000000000000000000000000000000 x 0.905520795732
506016 0000000000000000006c21460000000000000000000000000000000000000000 x 0.85585151017857
504000 0000000000000000007e578c0000000000000000000000000000000000000000 x 0.86681711132849
501984 00000000000000000091c1000000000000000000000000000000000000000000 x 0.96994982973303
499968 0000000000000000009645000000000000000000000000000000000000000000 x 0.84933654207052
497952 000000000000000000b0ed000000000000000000000000000000000000000000 x 0.84669308707519
495936 000000000000000000d0f6000000000000000000000000000000000000000000 x 1.012932911704
493920 000000000000000000ce4b000000000000000000000000000000000000000000 x 1.0648023065911
491904 000000000000000000c1bd000000000000000000000000000000000000000000 x 0.82376096199841
489888 000000000000000000eb30000000000000000000000000000000000000000000 x 0.93906262185136
487872 000000000000000000fa73000000000000000000000000000000000000000000 x 0.98179284576749
485856 000000000000000000ff18000000000000000000000000000000000000000000 x 0.83625513823616
483840 000000000000000001310b000000000000000000000000000000000000000000 x 0.96255346423597
481824 0000000000000000013ce9000000000000000000000000000000000000000000 x 1.0394757072571
479808 00000000000000000130e0000000000000000000000000000000000000000000 x 0.93174953739629
477792 0000000000000000014735000000000000000000000000000000000000000000 x 0.93525300343888
475776 0000000000000000015ddc000000000000000000000000000000000000000000 x 0.88084185680566
473760 0000000000000000018d30000000000000000000000000000000000000000000 x 1.0042865890998
471744 0000000000000000018b7e000000000000000000000000000000000000000000 x 0.95372036285195
469728 0000000000000000019eaf000000000000000000000000000000000000000000 x 0.87795659796884
467712 000000000000000001d854000000000000000000000000000000000000000000 x 0.93967158588425
465696 000000000000000001f6a7000000000000000000000000000000000000000000 x 0.93214580647031
463680 0000000000000000021b3e000000000000000000000000000000000000000000 x 0.99776661486755
461664 0000000000000000021c73000000000000000000000000000000000000000000 x 0.95934626745621
459648 000000000000000002335a000000000000000000000000000000000000000000 x 0.95210367524245
457632 0000000000000000024fb1000000000000000000000000000000000000000000 x 0.96860272536017
455616 00000000000000000262df000000000000000000000000000000000000000000 x 0.95661721975837
453600 0000000000000000027e93000000000000000000000000000000000000000000 x 0.95778088949561
451584 0000000000000000029ab9000000000000000000000000000000000000000000 x 0.9308163409992
449568 000000000000000002cc47000000000000000000000000000000000000000000 x 0.85733188081223
447552 0000000000000000034379000000000000000000000000000000000000000000 x 0.94297555276327
445536 00000000000000000375ff000000000000000000000000000000000000000000 x 0.97628322393199
443520 0000000000000000038b85000000000000000000000000000000000000000000 x 0.92459197764981
441504 000000000000000003d589000000000000000000000000000000000000000000 x 0.9826867422761
439488 000000000000000003e6d4000000000000000000000000000000000000000000 x 0.9035463398776
437472 0000000000000000045174000000000000000000000000000000000000000000 x 0.99606495984006
435456 00000000000000000455d2000000000000000000000000000000000000000000 x 1.0193381266055
433440 00000000000000000440c4000000000000000000000000000000000000000000 x 0.93309854439787
431424 0000000000000000048ed4000000000000000000000000000000000000000000 x 0.93618328266525
429408 000000000000000004de5e000000000000000000000000000000000000000000 x 0.97751893335948
427392 000000000000000004fb08000000000000000000000000000000000000000000 x 0.98468704371855
425376 0000000000000000050edc000000000000000000000000000000000000000000 x 0.92877636563334
423360 0000000000000000057228000000000000000000000000000000000000000000 x 1.0574526018257
421344 0000000000000000052669000000000000000000000000000000000000000000 x 0.99956169057131
419328 00000000000000000526fd000000000000000000000000000000000000000000 x 0.98150990343641
417312 0000000000000000053fd6000000000000000000000000000000000000000000 x 0.93606334349151
415296 0000000000000000059ba0000000000000000000000000000000000000000000 x 1.0165797204074
413280 0000000000000000058436000000000000000000000000000000000000000000 x 0.97462648744534
411264 000000000000000005a8fa000000000000000000000000000000000000000000 x 0.91971595614379
409248 0000000000000000062776000000000000000000000000000000000000000000 x 1.0001066269915
407232 000000000000000006274b000000000000000000000000000000000000000000 x 0.93380956791553
405216 00000000000000000696f4000000000000000000000000000000000000000000 x 0.99188093570206
403200 000000000000000006a4c3000000000000000000000000000000000000000000 x 0.95728237735915
401184 000000000000000006f0a8000000000000000000000000000000000000000000 x 1.0319670550331
399168 000000000000000006b99f000000000000000000000000000000000000000000 x 0.88149115578774
397152 000000000000000007a114000000000000000000000000000000000000000000 x 0.8328913350569
395136 00000000000000000928f0000000000000000000000000000000000000000000 x 0.94435678609352
393120 000000000000000009b31b000000000000000000000000000000000000000000 x 0.91642170607901
391104 00000000000000000a9591000000000000000000000000000000000000000000 x 0.89957994036943
389088 00000000000000000bc409000000000000000000000000000000000000000000 x 0.84647946542368
387072 00000000000000000de64f000000000000000000000000000000000000000000 x 0.9193500854832
385056 00000000000000000f1e76000000000000000000000000000000000000000000 x 0.90546943609548
383040 000000000000000010b289000000000000000000000000000000000000000000 x 0.94541582430494
381024 000000000000000011a954000000000000000000000000000000000000000000 x 0.9779908543077
379008 0000000000000000120f14000000000000000000000000000000000000000000 x 0.99884039085749
376992 0000000000000000121472000000000000000000000000000000000000000000 x 0.97569816715168
374976 00000000000000001287ba000000000000000000000000000000000000000000 x 0.9599277205003
372960 0000000000000000134dc1000000000000000000000000000000000000000000 x 0.9525784824271
370944 00000000000000001443c4000000000000000000000000000000000000000000 x 0.97130695531339
368928 000000000000000014dd04000000000000000000000000000000000000000000 x 0.99200116082927
366912 0000000000000000150815000000000000000000000000000000000000000000 x 0.97700884629561
364896 00000000000000001586c8000000000000000000000000000000000000000000 x 0.96721866699941
362880 000000000000000016418e000000000000000000000000000000000000000000 x 1.0058777243007
360864 0000000000000000162043000000000000000000000000000000000000000000 x 0.95768375488649
358848 0000000000000000171a8b000000000000000000000000000000000000000000 x 1.0255916485419
356832 00000000000000001686f5000000000000000000000000000000000000000000 x 0.97614937189776
354816 00000000000000001713dd000000000000000000000000000000000000000000 x 0.99931084881225
352800 00000000000000001717f0000000000000000000000000000000000000000000 x 1.0385592188106
350784 0000000000000000163c71000000000000000000000000000000000000000000 x 0.9448121287408
348768 00000000000000001788f2000000000000000000000000000000000000000000 x 1.0151978284679
346752 0000000000000000172ec0000000000000000000000000000000000000000000 x 0.98433023514366
344736 0000000000000000178d3a000000000000000000000000000000000000000000 x 0.95225468282177
342720 000000000000000018bb87000000000000000000000000000000000000000000 x 0.92841047600718
340704 00000000000000001aa3c0000000000000000000000000000000000000000000 x 1.0653889081792
338688 000000000000000019012f000000000000000000000000000000000000000000 x 0.92425332853544
336672 00000000000000001b0dca000000000000000000000000000000000000000000 x 0.9708844511908
334656 00000000000000001bdd7c000000000000000000000000000000000000000000 x 1.0139338928507
332640 00000000000000001b7b74000000000000000000000000000000000000000000 x 1.0073126357312
330624 00000000000000001b4861000000000000000000000000000000000000000000 x 0.98272050740887
328608 00000000000000001bc330000000000000000000000000000000000000000000 x 0.90864416530827
326592 00000000000000001e8dc0000000000000000000000000000000000000000000 x 0.97267915113637
324576 00000000000000001f6973000000000000000000000000000000000000000000 x 0.99025623091809
322560 00000000000000001fb893000000000000000000000000000000000000000000 x 0.8606031728027
320544 000000000000000024dbe9000000000000000000000000000000000000000000 x 0.91950641288683
318528 00000000000000002815ee000000000000000000000000000000000000000000 x 0.86933504350888
316512 00000000000000002e1c58000000000000000000000000000000000000000000 x 0.82742373488374
314496 000000000000000037ba62000000000000000000000000000000000000000000 x 0.94965929012318
312480 00000000000000003aaea2000000000000000000000000000000000000000000 x 0.92527265247005
310464 00000000000000003f6be6000000000000000000000000000000000000000000 x 0.97012885678148
308448 0000000000000000415fd1000000000000000000000000000000000000000000 x 0.80046443116431
306432 000000000000000051aba2000000000000000000000000000000000000000000 x 0.87327628262129
304416 00000000000000005d859a000000000000000000000000000000000000000000 x 0.88935261056018
302400 0000000000000000692842000000000000000000000000000000000000000000 x 0.84675337440801
300384 00000000000000007c3053000000000000000000000000000000000000000000 x 0.9037044974062
298368 0000000000000000896c00000000000000000000000000000000000000000000 x 0.87226024000793
296352 00000000000000009d8c00000000000000000000000000000000000000000000 x 0.87689698656346
294336 0000000000000000b3aa00000000000000000000000000000000000000000000 x 0.81815109308572
292320 0000000000000000db9900000000000000000000000000000000000000000000 x 0.84887882219706
290304 000000000000000102b100000000000000000000000000000000000000000000 x 0.89777133096549
288288 0000000000000001202600000000000000000000000000000000000000000000 x 0.82017812072627
286272 00000000000000015f5300000000000000000000000000000000000000000000 x 0.8376236332818
284256 0000000000000001a36e00000000000000000000000000000000000000000000 x 0.83689789555729
282240 0000000000000001f52c00000000000000000000000000000000000000000000 x 0.81571150642778
280224 0000000000000002666600000000000000000000000000000000000000000000 x 0.7926483261184
278208 0000000000000003071f00000000000000000000000000000000000000000000 x 0.83252638998439
276192 0000000000000003a30c00000000000000000000000000000000000000000000 x 0.76918707845225
274176 0000000000000004ba6e00000000000000000000000000000000000000000000 x 0.77878308075096
272160 0000000000000006124200000000000000000000000000000000000000000000 x 0.86157130823981
270144 00000000000000070bfb00000000000000000000000000000000000000000000 x 0.8383006685436
268128 000000000000000867f300000000000000000000000000000000000000000000 x 0.76513218658204
266112 000000000000000afc8500000000000000000000000000000000000000000000 x 0.68485938602782
264096 00000000000000100ab600000000000000000000000000000000000000000000 x 0.70698228035372
262080 0000000000000016b0ca00000000000000000000000000000000000000000000 x 0.78623318670163
260064 000000000000001cdc2000000000000000000000000000000000000000000000 x 0.75681463691416
258048 0000000000000026222200000000000000000000000000000000000000000000 x 0.77185597080476
256032 0000000000000031679c00000000000000000000000000000000000000000000 x 0.75633012444291
254016 0000000000000041525700000000000000000000000000000000000000000000 x 0.77278011507619
252000 0000000000000054873200000000000000000000000000000000000000000000 x 0.7359282940613
249984 0000000000000072dbf200000000000000000000000000000000000000000000 x 0.83590929362349
247968 0000000000000089680000000000000000000000000000000000000000000000 x 0.8370255800119
245952 00000000000000a4290000000000000000000000000000000000000000000000 x 0.81548104164241
243936 00000000000000c94e0000000000000000000000000000000000000000000000 x 0.90644293177141
241920 00000000000000de150000000000000000000000000000000000000000000000 x 0.80694060038322
239904 0000000000000113370000000000000000000000000000000000000000000000 x 0.77878365831012
237888 0000000000000161640000000000000000000000000000000000000000000000 x 0.92050345438081
235872 000000000000017fe90000000000000000000000000000000000000000000000 x 0.90069375074461
233856 00000000000001aa3d0000000000000000000000000000000000000000000000 x 0.89063469261158
231840 00000000000001de940000000000000000000000000000000000000000000000 x 0.85499741789607
229824 000000000000022fbe0000000000000000000000000000000000000000000000 x 0.8726477717014
227808 00000000000002816e0000000000000000000000000000000000000000000000 x 0.72398042414356
225792 0000000000000375fa0000000000000000000000000000000000000000000000 x 0.90103010054703
223776 00000000000003d74b0000000000000000000000000000000000000000000000 x 0.83587804003347
221760 00000000000004985c0000000000000000000000000000000000000000000000 x 0.89713890775629
219744 000000000000051f3c0000000000000000000000000000000000000000000000 x 0.90636770864554
217728 00000000000005a6b10000000000000000000000000000000000000000000000 x 1.0945757832796
215712 0000000000000529b10000000000000000000000000000000000000000000000 x 0.9169383446747
213696 00000000000005a16b0000000000000000000000000000000000000000000000 x 1.1310714132454
211680 00000000000004fa620000000000000000000000000000000000000000000000 x 1.0203927161722
209664 00000000000004e0ea0000000000000000000000000000000000000000000000 x 0.97960346713483
207648 00000000000004faeb0000000000000000000000000000000000000000000000 x 0.9808800238023
205632 0000000000000513c50000000000000000000000000000000000000000000000 x 0.92977916623588
203616 0000000000000575ef0000000000000000000000000000000000000000000000 x 0.99424077078657
201600 000000000000057e080000000000000000000000000000000000000000000000 x 0.93763985380962
199584 00000000000005db8b0000000000000000000000000000000000000000000000 x 0.94061305498383
197568 000000000000063a380000000000000000000000000000000000000000000000 x 0.90593881383548
195552 00000000000006dfbe0000000000000000000000000000000000000000000000 x 0.89765947865315
193536 00000000000007a85e0000000000000000000000000000000000000000000000 x 0.92961920833418
191520 000000000000083cc90000000000000000000000000000000000000000000000 x 0.91639308642646
189504 00000000000008fd2e0000000000000000000000000000000000000000000000 x 0.93841764620612
187488 0000000000000994310000000000000000000000000000000000000000000000 x 0.98579011007993
185472 00000000000009b78a0000000000000000000000000000000000000000000000 x 0.91695152962047
183456 0000000000000a98d60000000000000000000000000000000000000000000000 x 1.0049881410456
181440 0000000000000a8b5f0000000000000000000000000000000000000000000000 x 1.0893311474376
179424 00000000000009ae020000000000000000000000000000000000000000000000 x 0.87040337640278
177408 0000000000000b1ef70000000000000000000000000000000000000000000000 x 1.0459527298246
175392 0000000000000aa1e30000000000000000000000000000000000000000000000 x 1.0308255148928
173376 0000000000000a507e0000000000000000000000000000000000000000000000 x 0.92114669453866
171360 0000000000000b32870000000000000000000000000000000000000000000000 x 0.99912182290504
169344 0000000000000b350c0000000000000000000000000000000000000000000000 x 0.91938673836741
167328 0000000000000c309c0000000000000000000000000000000000000000000000 x 1.0024305498915
165312 0000000000000c290b0000000000000000000000000000000000000000000000 x 0.94787140789303
163296 0000000000000cd43f0000000000000000000000000000000000000000000000 x 0.95643543181774
161280 0000000000000d69d70000000000000000000000000000000000000000000000 x 0.92738142711558
159264 0000000000000e76ba0000000000000000000000000000000000000000000000 x 0.99578322365933
157248 0000000000000e86680000000000000000000000000000000000000000000000 x 0.94431123883859
155232 0000000000000f61b10000000000000000000000000000000000000000000000 x 1.0933167753061
153216 0000000000000e119a0000000000000000000000000000000000000000000000 x 1.0091942951588
151200 0000000000000df0ca0000000000000000000000000000000000000000000000 x 1.2199766316141
149184 0000000000000b6d4b0000000000000000000000000000000000000000000000 x 1.1506195791625
147168 00000000000009ee5d0000000000000000000000000000000000000000000000 x 1.0391224588523
145152 000000000000098ea50000000000000000000000000000000000000000000000 x 1.0127314796101
143136 000000000000096fe30000000000000000000000000000000000000000000000 x 1.0157086033549
141120 000000000000094a860000000000000000000000000000000000000000000000 x 1.0460130867162
139104 00000000000008e1e50000000000000000000000000000000000000000000000 x 0.8952285603558
137088 00000000000009ec040000000000000000000000000000000000000000000000 x 0.92437865969899
135072 0000000000000abbcf0000000000000000000000000000000000000000000000 x 0.88238489115682
133056 0000000000000c2a120000000000000000000000000000000000000000000000 x 0.63584643055118
131040 0000000000001321850000000000000000000000000000000000000000000000 x 0.64686313184809
129024 0000000000001d932f0000000000000000000000000000000000000000000000 x 0.76661449699777
127008 0000000000002694210000000000000000000000000000000000000000000000 x 0.56133679688281
124992 00000000000044b9f20000000000000000000000000000000000000000000000 x 0.64485190118241
122976 0000000000006a93b30000000000000000000000000000000000000000000000 x 0.69668809608166
120960 00000000000098fa000000000000000000000000000000000000000000000000 x 0.84204867979702
118944 000000000000b5ac000000000000000000000000000000000000000000000000 x 0.89169239028318
116928 000000000000cbbd000000000000000000000000000000000000000000000000 x 0.83766160764474
114912 000000000000f339000000000000000000000000000000000000000000000000 x 1.1045964980752
112896 000000000000dc31000000000000000000000000000000000000000000000000 x 0.72959190277113
110880 0000000000012dcd000000000000000000000000000000000000000000000000 x 0.65587700979643
108864 000000000001cc26000000000000000000000000000000000000000000000000 x 0.71305432137625
106848 0000000000028552000000000000000000000000000000000000000000000000 x 0.84669909232086
104832 000000000002fa29000000000000000000000000000000000000000000000000 x 0.83760335190734
102816 0000000000038dee000000000000000000000000000000000000000000000000 x 0.8844633615698
100800 00000000000404cb000000000000000000000000000000000000000000000000 x 0.88819454749025
98784 000000000004864c000000000000000000000000000000000000000000000000 x 0.84588942424268
96768 0000000000055953000000000000000000000000000000000000000000000000 x 0.65933687691144
94752 0000000000081cd2000000000000000000000000000000000000000000000000 x 0.85005356143577
92736 0000000000098b2a000000000000000000000000000000000000000000000000 x 0.66061171937548
90720 00000000000e7256000000000000000000000000000000000000000000000000 x 0.68154669565311
88704 0000000000153263000000000000000000000000000000000000000000000000 x 0.69508560757914
86688 00000000001e7eca000000000000000000000000000000000000000000000000 x 0.64123507516441
84672 00000000002f8e9d000000000000000000000000000000000000000000000000 x 0.95692532533823
82656 000000000031b2a3000000000000000000000000000000000000000000000000 x 0.69602759325171
80640 00000000004766ed000000000000000000000000000000000000000000000000 x 0.77670624056589
78624 00000000005bede6000000000000000000000000000000000000000000000000 x 0.87445671926363
76608 0000000000692098000000000000000000000000000000000000000000000000 x 0.82095643188335
74592 0000000000800e00000000000000000000000000000000000000000000000000 x 0.68811922753988
72576 0000000000ba1800000000000000000000000000000000000000000000000000 x 0.69346997001368
70560 00000000010c5a00000000000000000000000000000000000000000000000000 x 0.74338026035298
68544 000000000168fd00000000000000000000000000000000000000000000000000 x 0.25
66528 0000000005a3f400000000000000000000000000000000000000000000000000 x 0.51781054106111
64512 000000000ae49300000000000000000000000000000000000000000000000000 x 0.82569184041232
62496 000000000d314200000000000000000000000000000000000000000000000000 x 0.8957315430679
60480 000000000eba6400000000000000000000000000000000000000000000000000 x 0.9561367013373
58464 000000000f675c00000000000000000000000000000000000000000000000000 x 0.71280895449038
56448 00000000159c2400000000000000000000000000000000000000000000000000 x 1.084664501261
54432 0000000013ec5300000000000000000000000000000000000000000000000000 x 0.89222137108815
52416 0000000016546f00000000000000000000000000000000000000000000000000 x 0.68209888195793
50400 0000000020bca700000000000000000000000000000000000000000000000000 x 0.77821418013446
48384 000000002a111500000000000000000000000000000000000000000000000000 x 0.7501734015021
46368 0000000038137500000000000000000000000000000000000000000000000000 x 0.99253451389671
44352 00000000387f6f00000000000000000000000000000000000000000000000000 x 0.83449813104228
42336 0000000043b3e500000000000000000000000000000000000000000000000000 x 0.66850525896459
40320 0000000065465700000000000000000000000000000000000000000000000000 x 0.71947661561676
38304 000000008cc30000000000000000000000000000000000000000000000000000 x 0.73913400201013
36288 00000000be710000000000000000000000000000000000000000000000000000 x 0.97086585948702
34272 00000000c4280000000000000000000000000000000000000000000000000000 x 0.90639327100105
32256 00000000d86a0000000000000000000000000000000000000000000000000000 x 0.84538033112078
30240 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
28224 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
26208 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
24192 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
22176 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
20160 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
18144 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
16128 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
14112 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
12096 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
10080 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
8064 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
6048 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
4032 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
2016 00000000ffff0000000000000000000000000000000000000000000000000000 x 1
0 00000000ffff0000000000000000000000000000000000000000000000000000  

* The adjustment ratios in this table are calculated based on the change from one target to the next. The actual adjustment ratios are calculated based on the time between blocks. See each block for details.

Adjustment

How is the target calculated?

tool-6629484472519
Tool Icon

Target Adjustment

Calculate the next target value based on the current target and the time between blocks.

0x
0 bytes
Time (seconds)
0d
0d

The target adjustment period is 2016 blocks. A block is mined on average every 600 seconds (10 minutes), so the expected time is 2016 * 600 = 1209600 seconds.

Ratio

The actual time divided by the expected time. We multiply the current target by this ratio to get the new target.

0x
0x
0 bytes

Note: This target value has been truncated slightly for storage in the bits field of the block header, and that's the target value that's actually used when mining.

0 secs

The target for the first block was set at:

Height: 0 (Genesis Block)
00000000ffff0000000000000000000000000000000000000000000000000000

Diagram showing the target for the genesis block.

This initial target value is hard-coded in to the source code of every Bitcoin node (see chainparams.cpp). It's also the maximum possible target value. It was most likely a best-guess by Satoshi at what be a good starting point for a difficult-enough target that would result in a 10-minute interval between new blocks.

On every 2016th block, each node will look at the time between the previous 2015 blocks and work out if they were mined faster or slower than 10 minutes on average.

Diagram showing the target period between the genesis block and the 2016th block along with the timestamp of each block.

Each block contains a timestamp in its block header. This timestamp is in Unix Time, which is the number of seconds since .

If blocks during this period were mined faster than every 10 minutes, the target will adjust downwards to make it more difficult to get below the target for the next period of blocks.

Diagram showing the target value adjusting downwards due to blocks being mined more quickly than expected.

Conversely, if blocks were mined slower than every 10 minutes, the target will adjust upwards to make it less difficult to get below the target for the next period of blocks.

Diagram showing the target value adjusting upwards due to blocks being mined more slowly than expected.

As a result, each node regularly recalculates the target to maintain a 10-minute average interval between new blocks as miners join and leave the network over time.

See the code at the bottom of the page for a worked example.

Synchronisation

How do nodes calculate the same target?

Everyone does the same calculation with the same chain data, so they all get the same result at the same link in the chain.
Satoshi Nakamoto, Bitcoin P2P e-cash paper

Each node on the network operates independently, so there is no central authority to determine the current target value.

However, because nodes always adopt the longest chain of blocks as their blockchain, they will each calculate the same target.

For example, when you run Bitcoin for the first time, your node will perform the initial block download and calculate the targets as it goes. And because you're receiving the same blocks as everyone else, you will end up calculating the same current target when you reach the tip of the blockchain.

Diagram showing the initial block download and target calculations.

Furthermore, all nodes continually update to the same version of the blockchain (as they will always adopt the longest available chain of blocks). Therefore, nodes will also calculate the same target value as each new block is mined.

Diagram showing nodes on the network recalculating the target when new blocks are mined.

As a result, despite the fact nodes calculate the target independently, they each share the same blockchain and calculate the same target value as each other.

Purpose

Why does Bitcoin use a target?

The target regulates the speed at which new blocks are added on to the blockchain.

This has two benefits:

1. It gives blocks time to propagate across the network.

If broadcasts turn out to be slower in practice than expected, the target time between blocks may have to be increased to avoid wasting resources. We want blocks to usually propagate in much less time than it takes to generate them, otherwise nodes would spend too much time working on obsolete blocks.
Satoshi Nakamoto, Bitcoin P2P e-cash paper

It's preferable to have miners working on extending the same chain of blocks as much as possible. For this to work, we need to allow time for new blocks to propagate across the network before the next block gets mined.

Diagram showing a newly-mined block propagating across nodes on the network.

If blocks are being mined faster than they can be broadcast across the network, it will result in miners regularly working on top of "old" blocks in the blockchain (because they haven't had chance to receive the latest blocks yet).

This will result in miners building multiple competing blockchains; only one of these will become the longest, so some miners will end up wasting energy working to build on top of a competing chain only for it to be left behind due to a chain reorganisation.

Diagram showing miners working on building two different blockchains due to not receiving the latest blocks quickly enough.

Therefore, this time delay (block interval) allows blocks to propagate the network so that more miners can adopt the longest available chain, which helps to concentrate the network's mining power on extending the same chain of blocks.

Diagram showing miners focused on extending the same blockchain due to the latest block having time to propagate the network.

2. A consistent issuance of new bitcoins.

Coins have to get initially distributed somehow, and a constant rate seems like the best formula.
Satoshi Nakamoto, Bitcoin P2P e-cash paper

Bitcoin is a currency, so having a fixed rate of new bitcoins introduced in to the system helps to provide stability.

Diagram showing block rewards being issued at a constant rate.

So thanks to the target, you can be confident that new bitcoins will be minted at a predictable rate.

Location

Where can you find the target?

The target gets stored in the bits field in the block header of every block.

Diagram showing the target being stored in the bits field of a block header.

The bits field is a compact representation of the target (to save space in the block header). But you can easily convert between the bits representation and the full target.

Target Bits

Commands

bitcoin-cli getblocktemplate

This is the simplest way to get the current target. When you request a block template (for mining purposes) it will also return the current target.

This command returns a lot of data, so it's best to grep for the target.

$ bitcoin-cli getblocktemplate '{"rules": ["segwit"]}' | grep target

"target": "0000000000000000000331db0000000000000000000000000000000000000000",

bitcoin-cli getdifficulty

Alternatively, to get the current target you can ask for the current difficulty, which you can then convert to the target:

$ bitcoin-cli getdifficulty
88104191118793.16

Converting from difficulty to target is not always accurate. The difficulty is a floating point number calculated from the change between the first and current target value, so it can lose precision and give you an inaccurate result.

bitcoin-cli getblockheader [block hash]

This command allows you to find a previous target for specific block. The target at the time of mining is stored in every block header in bits format, which you can convert to a full target value.

$ bitcoin-cli getblockheader 000000000000000002e9533a4fe03bb251b3fdb30ffaa384aad133b7fae594cf
{
  "hash": "000000000000000002e9533a4fe03bb251b3fdb30ffaa384aad133b7fae594cf",
  "confirmations": 425677,
  "height": 401184,
  "version": 4,
  "versionHex": "00000004",
  "merkleroot": "b4afa0502a55fdfa4a5cda6ea2bc546ba527d276ea9c7e848b8cd478cd9b6607",
  "time": 1457133956,
  "mediantime": 1457132303,
  "nonce": 3778923481,
  "bits": "1806f0a8",
  "difficulty": 158427203767.3917,
  "chainwork": "00000000000000000000000000000000000000000012da32364c8f47d519604d",
  "nTx": 845,
  "previousblockhash": "000000000000000003c4a4d9c62b3a7f4893afe14eef8a6a377229d23ad4b1ea",
  "nextblockhash": "00000000000000000037ab74c8db9b7a9d7de039210d8eafaeb44ba35adfb624"
}

You can get the target for the most recent block in the chain using this one-liner:
$ bitcoin-cli getblockheader $(bitcoin-cli getblockhash $(bitcoin-cli getblockcount))

Code

Here's some example Ruby code for calculating target adjustments.

This code works out the new target for block 403,200, using the timestamps from blocks 401,184 and 403,199.

# 403,200 - NEW TARGET
# 403,199              | last block
#		               |
#                      |
#                      |
# 401,184 - NEW TARGET | first block (target = 0x000000000000000006f0a8000000000000000000000000000000000000000000)

# 1. Get the timestamps for the first and last block in the target adjustment period
first = 1457133956 # block 401,184
last  = 1458291885 # block 403,199

# 2. Work out the ratio of the actual time against the expected time
actual = last - first     # 1157929 (number of seconds between first and last block)
expected = 2016 * 10 * 60 # 1209600 (number of seconds expected between 2016 blocks)
ratio = actual.to_f / expected.to_f

# 3. Limit the adjustment by a factor of 4 (to prevent massive changes from one target to the next)
ratio = 0.25 if ratio < 0.25
ratio = 4 if ratio > 4

# 4. Multiply the current target by this ratio to get the new target
current_target = 0x000000000000000006f0a8000000000000000000000000000000000000000000
new_target = (current_target * ratio)

# 5. Don't let the target go above the maximum target
max_target = 0x00000000ffff0000000000000000000000000000000000000000000000000000
new_target = max_target if new_target > max_target

# 5. Truncate the target, because the official target is the truncated "bits" format stored in the block header
# This code is a bit rough, because it's working with strings when I should really be working with actual bytes.
new_target = new_target.to_i.to_s(16) # convert from decimal to hexadecimal
new_target = new_target.size % 2 != 0 ? '0' + new_target : new_target # make sure it's an even number of characters (i.e. bytes)
truncated = new_target.scan(/../).each_with_index.map { |byte, i| byte = i >= 3 ? "00" : byte }.join # set all bytes apart from first 3 to zeros
# e.g. 6a4c316c01f354000000000000000000000000000000000 <- full precision
# e.g. 6a4c3000000000000000000000000000000000000000000 <- official target

# 6. Display the full target (with leading zeros)
target = truncated.rjust(64, '0')
puts target
# 000000000000000006a4c3000000000000000000000000000000000000000000

Off-by-one error. Target adjustments are actually calculated using the time across 2015 blocks (e.g. 403199 - 401184 = 2015), and not across 2016 blocks as you would expect. This is an implementation error in the code, and it still exists today.

Official Target. The actual target that miners need to get below when mining is the truncated target that gets stored in the bits field. So it's not actually the full-precision target that you get after a target adjustment calculation.

FAQs

Why 10 minutes between blocks?

I don't think anyone except Satoshi knows why 10 minutes was chosen exactly.

My guess is that it seemed long enough to allow blocks to propagate around the network (to minimize chain reorganisations), and short enough to not have to wait too long new transactions to get mined on to the blockchain.

And 10 is a nice round number.

What causes blocks to be mined faster or slower than every 10 minutes?

Firstly, mining is unpredictable, so you never know when a miner is going to find the next block with a block hash below the current target.

Secondly (and most importantly), miners can join and leave the network at any time, which affects the speed at which blocks can be mined. For example, the more miners that join the network, the more hashing there will be taking place, and the more likely it is a new block will be mined in under 10 minutes.

Resources

Thanks