Potassium–argon dating, abbreviated K–Ar dating, is a radiometric dating method used in geochronology and archaeology. It is based on measurement of the product of the radioactive decay of an isotope of potassium (K) into argon (Ar). Potassium is a common element found in many materials, such as feldspars, micas, clay minerals, tephra, and evaporites. In these materials, the decay product 40Ar is able to escape the liquid (molten) rock but starts to accumulate when the rock solidifies (recrystallizes). The amount of argon sublimation that occurs is a function of the purity of the sample, the composition of the mother material, and a number of other factors. These factors introduce error limits on the upper and lower bounds of dating, so that the final determination of age is reliant on the environmental factors during formation, melting, and exposure to decreased pressure or open air. Time since recrystallization is calculated by measuring the ratio of the amount of 40Ar accumulated to the amount of 40K remaining. The long half-life of 40K allows the method to be used to calculate the absolute age of samples older than a few thousand years.
 The quickly cooled lavas that make nearly ideal samples for K–Ar dating also preserve a record of the direction and intensity of the local magnetic field as the sample cooled past the Curie temperature of iron. The geomagnetic polarity time scale was calibrated largely using K–Ar dating.
 Potassium naturally occurs in 3 isotopes: 39K (93.2581%), 40K (0.0117%), 41K (6.7302%). 39K and 41K are stable. The 40K isotope is radioactive; it decays with a half-life of 1.248×109 years to 40Ca and 40Ar. Conversion to stable 40Ca occurs via electron emission (beta decay) in 89.3% of decay events. Conversion to stable 40Ar occurs via electron capture in the remaining 10.7% of decay events.
 Argon, being a noble gas, is a minor component of most rock samples of geochronological interest: It does not bind with other atoms in a crystal lattice.  When 40K decays to 40Ar; the atom typically remains trapped within the lattice because it is larger than the spaces between the other atoms in a mineral crystal. But it can escape into the surrounding region when the right conditions are met, such as changes in pressure or temperature. 40Ar atoms can diffuse through and escape from molten magma because most crystals have melted and the atoms are no longer trapped. Entrained argon – diffused argon that fails to escape from the magma – may again become trapped in crystals when magma cools to become solid rock again. After the recrystallization of magma, more 40K will decay and 40Ar will again accumulate, along with the entrained argon atoms, trapped in the mineral crystals. Measurement of the quantity of 40Ar atoms is used to compute the amount of time that has passed since a rock sample has solidified.
 Despite 40Ca being the favored daughter nuclide, it is rarely useful in dating because calcium is so common in the crust, with 40Ca being the most abundant isotope. Thus, the amount of calcium originally present is not known and can vary enough to confound measurements of the small increases produced by radioactive decay.
 The ratio of the amount of 40Ar to that of 40K is directly related to the time elapsed since the rock was cool enough to trap the Ar by the equation:
 where:
 The scale factor 0.109 corrects for the unmeasured fraction of 40K which decayed into 40Ca; the sum of the measured 40K and the scaled amount of 40Ar gives the amount of 40K which was present at the beginning of the elapsed time period. In practice, each of these values may be expressed as a proportion of the total potassium present, as only relative, not absolute, quantities are required.
 To obtain the content ratio of isotopes 40Ar to 40K in a rock or mineral, the amount of Ar is measured by mass spectrometry of the gases released when a rock sample is volatilized in vacuum. The potassium is quantified by flame photometry or atomic absorption spectroscopy.
 The amount of 40K is rarely measured directly. Rather, the more common 39K is measured and that quantity is then multiplied by the accepted ratio of 40K/39K (i.e., 0.0117%/93.2581%, see above).
 The amount of 40Ar is also measured to assess how much of the total argon is atmospheric in origin.
 According to McDougall & Harrison (1999, p. 11) the following assumptions must be true for computed dates to be accepted as representing the true age of the rock:
 Both flame photometry and mass spectrometry are destructive tests, so particular care is needed to ensure that the aliquots used are truly representative of the sample. Ar–Ar dating is a similar technique that compares isotopic ratios from the same portion of the sample to avoid this problem.
 Due to the long half-life of 40K, the technique is most applicable for dating minerals and rocks more than 100,000 years old. For shorter timescales, it is unlikely that enough 40Ar will have had time to accumulate to be accurately measurable. K–Ar dating was instrumental in the development of the geomagnetic polarity time scale. Although it finds the most utility in geological applications, it plays an important role in archaeology. One archeological application has been in bracketing the age of archeological deposits at Olduvai Gorge by dating lava flows above and below the deposits. It has also been indispensable in other early east African sites with a history of volcanic activity such as Hadar, Ethiopia. The K–Ar method continues to have utility in dating clay mineral diagenesis. In 2017, the successful dating of illite formed by weathering was reported. This finding indirectly lead to the dating of the strandflat of Western Norway from where the illite was sampled. Clay minerals are less than 2 μm thick and cannot easily be irradiated for Ar–Ar analysis because Ar recoils from the crystal lattice.
 In 2013, the K–Ar method was used by the Mars Curiosity rover to date a rock on the Martian surface, the first time a rock has been dated from its mineral ingredients while situated on another planet.