The Allen–Cahn equation (after John W. Cahn and Sam Allen) is a reaction–diffusion equation of mathematical physics which describes the process of phase separation in multi-component alloy systems, including order-disorder transitions.
The equation describes the time evolution of a scalar-valued state variable   on a domain
 on a domain  during a time interval
 during a time interval  , and is given by:
, and is given by:
![{\displaystyle {{\partial \eta } \over {\partial t}}=M_{\eta }[\operatorname {div} (\varepsilon _{\eta }^{2}\nabla \,\eta )-f'(\eta )]\quad {\text{on }}\Omega \times {\mathcal {T}},\quad \eta ={\bar {\eta }}\quad {\text{on }}\partial _{\eta }\Omega \times {\mathcal {T}},}](./19e8f302d7b872a9a91ef5a7d0f1cd63bc976122.svg) 
 
where  is the mobility,
 is the mobility,  is a double-well potential,
 is a double-well potential,   is the control on the state variable at the portion of the boundary
 is the control on the state variable at the portion of the boundary  ,
,  is the source control at
 is the source control at  ,
,   is the initial condition, and
 is the initial condition, and  is the outward normal to
 is the outward normal to   .
.
It is the L2 gradient flow of the Ginzburg–Landau free energy functional. It is closely related to the Cahn–Hilliard equation.