The chemical potential, *μ*_{B}, of a substance B in an ideal mixture of liquids or an ideal solution is given by

μ
B
=
μ
B
⊖
+
R
T
ln
x
B
where *μ*~~o~~

B is the chemical potential of a pure substance
B
and *x*_{B} is the mole fraction of the substance in the mixture.

This is generalised to include non-ideal behavior by writing

μ
B
=
μ
B
⊖
+
R
T
ln
a
B
when *a*_{B} is the activity of the substance in the mixture with

a
B
=
x
B
γ
B

where *γ*_{B} is the activity coefficient, which may itself depend on *x*_{B}. As *γ*_{B} approaches 1, the substance behaves as if it were ideal. For instance, if *γ*_{B} ≈ 1, then Raoult's law is accurate. For *γ*_{B} > 1 and *γ*_{B} < 1, substance B shows positive and negative deviation from Raoult's law, respectively. A positive deviation implies that substance B is more volatile.

In many cases, as *x*_{B} goes to zero, the activity coefficient of substance B approaches a constant; this relationship is Henry's law for the solvent. These relationships are related to each other through the Gibbs–Duhem equation. Note that in general activity coefficients are dimensionless.

In detail: Raoult's law states that the partial pressure of component B is related to its vapor pressure (saturation pressure) and its mole fraction *x*_{B} in the liquid phase,

p
B
=
x
B
γ
B
p
B
σ
,
with the convention
lim
x
B
→
1
γ
B
=
1
.
In other words: Pure liquids represent the ideal case.

At infinite dilution, the activity coefficient approaches its limiting value, *γ*_{B}^{∞}. Comparison with Henry's law,

p
B
=
K
H
,
B
x
B
for
x
B
→
0
,
immediately gives

K
H
,
B
=
p
B
σ
γ
B
∞
.
In other words: The compound shows nonideal behavior in the dilute case.

The above definition of the activity coefficient is impractical if the compound does not exist as a pure liquid. This is often the case for electrolytes or biochemical compounds. In such cases, a different definition is used that considers infinite dilution as the ideal state:

γ
B
†
≡
γ
B
/
γ
B
∞
with
lim
x
B
→
0
γ
B
†
=
1
,
and

μ
B
=
μ
B
⊖
+
R
T
ln
γ
B
∞
⏟
μ
B
⊖
†
+
R
T
ln
(
x
B
γ
B
†
)
The
†
symbol has been used here to dinstinguish between the two kinds of activity coefficients. Usually it is omitted, as it is clear from the context which kind is meant. But there are cases where both kinds of activity coefficients are needed and may even appear in the same equation, e.g., for solutions of salts in (water + alcohol) mixtures. This is sometimes a source of errors.

Modifying mole fractions or concentrations by activity coefficients gives the *effective activities* of the components, and hence allows expressions such as Raoult's law and equilibrium constants to be applied to both ideal and non-ideal mixtures.

Knowledge of activity coefficients is particularly important in the context of electrochemistry since the behaviour of electrolyte solutions is often far from ideal, due to the effects of the ionic atmosphere. Additionally, they are particularly important in the context of soil chemistry due to the low volumes of solvent and, consequently, the high concentration of electrolytes.

For solution of substances which ionize in solution the activity coefficients of the cation and anion cannot be experimentally determined independently of each other because solution properties depend on both ions. Single ion activity coefficients must be linked to the activity coefficient of the dissolved electrolyte as if undissociated. In this case a mean stoichiometric activity coefficient of the dissolved electrolyte, *γ*_{±}, is used. It is called stoichiometric because it expresses both the deviation from the ideality of the solution and the incomplete ionic dissociation of the ionic compound which occurs especially with the increase of its concentration.

For a 1:1 electrolyte, such as NaCl it is given by the following:

γ
±
=
γ
+
γ
−

where *γ*_{+} and *γ*_{−} are the activity coefficients of the cation and anion respectively.

More generally, the mean activity coefficient of a compound of formula A_{p}B_{q} is given by

γ
±
=
γ
A
p
γ
B
q
p
+
q
Single-ion activity coefficients can be calculated theoretically, for example by using the Debye–Hückel equation. The theoretical equation can be tested by combining the calculated single-ion activity coefficients to give mean values which can be compared to experimental values.

The prevailing view that single ion activity coefficients are unmeasurable independently, or perhaps even physically meaningless, has its roots in the work of Guggenheim in the late 1920s. However, chemists have never been able to give up the idea of single ion activities, and by implication single ion activity coefficients. For example, pH is defined as the negative logarithm of the hydrogen ion activity. If the prevailing view on the physical meaning and measurability of single ion activities is correct then defining pH as the negative logarithm of the hydrogen ion activity places the quantity squarely in the unmeasurable category. Recognizing this logical difficulty, International Union of Pure and Applied Chemistry (IUPAC) states that the activity-based definition of pH is a notional definition only. Despite the prevailing negative view on the measurability of single ion coefficients, the concept of single ion activities continues to be discussed in the literature, and at least one author presents a definition of single ion activity in terms of purely thermodynamic quantities and proposes a method of measuring single ion activity coefficients based on purely thermodynamic processes.

Activity coefficients may be determined experimentally by making measurements on non-ideal mixtures. Use may be made of Raoult's law or Henry's law to provide a value for an ideal mixture against which the experimental value may be compared to obtain the activity coefficient. Other colligative properties, such as osmotic pressure may also be used.

Activity coefficients can be determined by radiochemical methods.

Activity coefficients of electrolyte solutions may be calculated theoretically, using the Debye–Hückel equation or extensions such as the Davies equation, Pitzer equations or TCPC model. Specific ion interaction theory (SIT) may also be used.

For non-electrolyte solutions correlative methods such as UNIQUAC, NRTL, MOSCED or UNIFAC may be employed, provided fitted component-specific or model parameters are available. COSMO-RS is a theoretical method which is less dependent on model parameters as required information is obtained from quantum mechanics calculations specific to each molecule (sigma profiles) combined with a statistical thermodynamics treatment of surface segments.

For uncharged species, the activity coefficient *γ*_{0} mostly follows a salting-out model:

log
10
(
γ
0
)
=
b
I
This simple model predicts activities of many species (dissolved undissociated gases such as CO_{2}, H_{2}S, NH_{3}, undissociated acids and bases) to high ionic strengths (up to 5 mol/kg). The value of the constant *b* for CO_{2} is 0.11 at 10 °C and 0.20 at 330 °C.

For water as solvent, the activity *a*_{w} can be calculated using:

ln
(
a
w
)
=
−
ν
m
55.51
φ
where *ν* is the number of ions produced from the dissociation of one molecule of the dissolved salt, *m* is the molality of the salt dissolved in water, *φ* is the osmotic coefficient of water, and the constant 55.51 represents the molality of water. In the above equation, the activity of a solvent (here water) is represented as inversely proportional to the number of particles of salt versus that of the solvent.

The ionic activity coefficient is connected to the ionic diameter a by the formula obtained from Debye-Huckel theory of electrolytes:

log
(
γ
i
)
=
−
A
z
i
2
I
1
+
B
a
I
where A and B are constant, *z*_{i} is the valence number of the ion, and *I* is ionic strength.

The derivative of an activity coefficient with respect to temperature is related to excess molar enthalpy by

H
¯
i
E
=
−
R
T
2
∂
∂
T
ln
(
γ
i
)
Similarly, the derivative of an activity coefficient with respect to pressure can be related to excess molar volume.

V
¯
i
E
=
R
T
∂
∂
P
ln
(
γ
i
)
For concentrated ionic solutions the activity coefficient of the electrolyte is split into electric and statistical components.

The statistical part includes hydration index number h , the number of ions from the dissociation and the ratio r between the apparent molar volume of the electrolyte and the molar volume of water and molality b.

Concentrated solution statistical part of the activity coefficient is:
l
n
γ
s
=
h
−
ν
ν
l
n
(
1
+
b
r
55.5
)
−
h
ν
l
n
(
1
−
b
r
55.5
)
+
b
r
(
r
+
h
−
ν
)
55.5
(
1
+
b
r
55.5
)

At equilibrium, the sum of the chemical potentials of the reactants is equal to the sum of the chemical potentials of the products. The Gibbs free energy change for the reactions, Δ_{r}*G*, is equal to the difference between these sums and therefore, at equilibrium, is equal to zero. Thus, for an equilibrium such as

*α* A +

*β* B ⇌

*σ* S +

*τ* T

Δ
r
G
=
σ
μ
S
+
τ
μ
T
−
(
α
μ
A
+
β
μ
B
)
=
0
Substitute in the expressions for the chemical potential of each reactant:

Δ
r
G
=
σ
μ
S
⊖
+
σ
R
T
ln
a
S
+
τ
μ
T
⊖
+
τ
R
T
ln
a
T
−
(
α
μ
A
⊖
+
α
R
T
ln
a
A
+
β
μ
B
⊖
+
β
R
T
ln
a
B
)
=
0

Upon rearrangement this expression becomes

Δ
r
G
=
(
σ
μ
S
⊖
+
τ
μ
T
⊖
−
α
μ
A
⊖
−
β
μ
B
⊖
)
+
R
T
ln
a
S
σ
a
T
τ
a
A
α
a
B
β
=
0
The sum *σμ*~~o~~

S + *τμ*~~o~~

T − *αμ*~~o~~

A − *βμ*~~o~~

B is the standard free energy change for the reaction, Δ_{r}*G*^{o}. Therefore,

Δ
r
G
⊖
=
−
R
T
ln
K
*K* is the equilibrium constant. Note that activities and equilibrium constants are dimensionless numbers.

This derivation serves two purposes. It shows the relationship between standard free energy change and equilibrium constant. It also shows that an equilibrium constant is defined as a quotient of activities. In practical terms this is inconvenient. When each activity is replaced by the product of a concentration and an activity coefficient, the equilibrium constant is defined as

K
=
[
S
]
σ
[
T
]
τ
[
A
]
α
[
B
]
β
×
γ
S
σ
γ
T
τ
γ
A
α
γ
B
β
where [S] denotes the concentration of S, etc. In practice equilibrium constants are determined in a medium such that the quotient of activity coefficient is constant and can be ignored, leading to the usual expression

K
=
[
S
]
σ
[
T
]
τ
[
A
]
α
[
B
]
β
which applies under the conditions that the activity quotient has a particular (constant) value.