Alligation Calculator: Mix Ratio and Volume Solver
Enter the higher concentration, lower concentration, and target concentration to find the alligation ratio (parts of each component) and the exact volumes needed. Enter a desired final volume to get millilitre-precise amounts for both components. The result updates instantly as you type, and a step-by-step panel shows the cross-multiplication working.
Formula
Worked example
Mix a 20% zinc oxide ointment with a 5% ointment to make 100 g of 10%: H = 10 - 5 = 5, L = 20 - 10 = 10. Ratio = 5:10 = 1:2. For 100 g: V1 = (5/15) x 100 = 33.3 g of 20%, V2 = (10/15) x 100 = 66.7 g of 5%.
What is alligation?
Alligation is an arithmetic technique for finding the ratio in which two or more ingredients of different concentrations, strengths, or costs must be combined to produce a mixture of a specified intermediate value. The method is widely used in pharmacy compounding, chemical preparation, food manufacturing, and metallurgy. It predates algebra and appears in medieval arithmetic texts under the name "alligation alternate" (two-component mixing) and "alligation medial" (finding the mean concentration of a known mixture). Today the same calculations are done algebraically, but the cross diagram of the alligation alternate method remains a reliable mental check and is still tested in pharmacy licensing exams.
How the alligation alternate method works
Place the higher concentration (C1) at the top left of a cross, the lower concentration (C2) at the bottom left, and the desired concentration (Cd) in the centre. Subtract diagonally: the parts of C1 needed equal Cd minus C2, and the parts of C2 needed equal C1 minus Cd. These two differences form the ratio in which the two components must be combined. If the desired concentration equals neither extreme, the differences will both be positive and their sum equals the total number of parts. Multiplying each part fraction by the desired total volume gives the exact volume of each component to measure.
Pharmacy compounding applications
Pharmacists routinely use alligation when a prescribed concentration is not commercially available and must be compounded from two stock solutions or semisolid bases. Typical examples include diluting a 70% isopropyl alcohol stock to 50%, blending a 20% hydrocortisone cream with a plain base to reach 2.5%, or mixing dextrose 50% injection with normal saline to reach a specific caloric density. The method extends to non-aqueous preparations such as creams, ointments, and powders, as long as concentrations are expressed in the same unit (w/w, w/v, or v/v) throughout the calculation. Always verify the final concentration analytically before dispensing.
Alligation versus the algebraic method
For a two-component problem both methods always give the same answer. The algebraic approach sets up one equation: C1 * V1 + C2 * V2 = Cd * Vf, with the constraint V1 + V2 = Vf. Solving simultaneously yields V1 = (Cd - C2) / (C1 - C2) * Vf, which is identical to the alligation formula. The alligation cross is simply a graphical shortcut that avoids writing simultaneous equations. For problems with three or more components the full algebraic (or linear programming) approach is needed because the alligation cross does not extend to more than two ingredients without additional constraints.
Common alligation examples in pharmacy and chemistry
| C1 (higher %) | C2 (lower %) | Target % | Ratio (C1:C2) | Notes |
|---|---|---|---|---|
| 70 | 30 | 50 | 1 : 1 | Equal parts (isopropyl alcohol dilution) |
| 95 | 70 | 91 | 3 : 1 | High-proof alcohol blend |
| 20 | 5 | 10 | 1 : 2 | Zinc oxide ointment compounding |
| 50 | 5 | 10 | 1 : 8 | Dextrose IV dilution |
| 10 | 2 | 5 | 3 : 5 | Hydrogen peroxide dilution |
| 1 | 0 | 0.025 | 1 : 39 | Steroid cream dilution |
Representative two-component mixing problems solved with the alligation alternate method.
Frequently asked questions
What must be true for the alligation method to work?
The desired concentration must fall strictly between the two component concentrations. If it equals the higher or lower concentration no mixing is needed and the ratio degenerates. If it lies outside the range (for example higher than both components) the alligation alternate method does not apply and a different formulation strategy is required.
Can I use this calculator for weight-in-weight (w/w) preparations like ointments?
Yes. The alligation math is identical for v/v (volumes), w/v (weight per volume), and w/w (weight per weight) preparations provided all three concentrations are expressed in the same unit. Enter the concentrations and the total weight instead of total volume, and the calculator returns the weight of each component to weigh out.
How do I verify my mixture after compounding?
The simplest check is a mass-balance calculation: multiply each component volume by its concentration, add the products, and divide by the total volume. The result should equal the desired concentration. In practice, final verification by a calibrated refractometer, UV-Vis assay, titration, or HPLC is required before clinical use.
What if my ratio comes out as a non-integer like 1.67 : 1?
That is perfectly valid. Non-integer ratios are common whenever the desired concentration is not evenly divisible between the two extremes. This calculator converts the ratio to integer form by scaling both sides to the smallest whole numbers, but the fractional intermediate values are shown in the steps panel for reference. When measuring, multiply both sides of the ratio by any convenient factor to get whole numbers of mL.
Can this method handle three or more stock concentrations?
Not with the standard alligation alternate approach, which is strictly two-component. For three or more components you need simultaneous equations or, in industrial settings, linear programming. For pharmacy, the usual workaround is to apply alligation twice in sequence: first blend two of the three concentrations to an intermediate, then blend that intermediate with the third.
Does the alligation method work for mixing solutions at different costs?
Yes. Alligation is historically a mercantile method and works for any additive property including cost per unit, proof, caloric density, or any concentration measured in consistent units. Simply substitute cost per litre (or per gram) in place of concentration.