Alligation Calculator

Solve alligation alternate problems.

Science Pharmacy-grade Verified mix Parts + volume
Rate this calculator · 4.5 (2)

Alligation alternate

Mix two strengths to target · grid method · verified output

Instructions — Alligation Calculator

1

Enter both strengths

Type the higher and lower concentrations as percentages. The target must fall between them — alligation cannot extrapolate beyond either strength.

2

Set the target and total volume

The target is the desired concentration. The total volume is what you need to dispense (typically in millilitres).

3

Read the mix

The result shows the parts ratio (grid method), the exact volume of each component, and a verified target concentration. Use the verification cell as a sanity check before compounding.

Formulas

Alligation alternate
$$ \frac{Q_A}{Q_B} = \frac{C - S_B}{S_A - C} $$
Parts of higher strength (Q_A) to lower strength (Q_B) needed to hit target C, given strengths S_A and S_B.
Verification
$$ S_A Q_A + S_B Q_B = C (Q_A + Q_B) $$
A correct alligation always satisfies this conservation: total active mass equals target concentration times total volume.
Alligation medial
$$ \bar{C} = \frac{\sum Q_i S_i}{\sum Q_i} $$
If you already mixed and want the final strength, weight each component by its volume.

Reference

Common pharmacy targets
Use caseStockDiluentTarget
Topical hydrocortisone2.5%0% (base)1.0%
Sodium chloride saline23.4%0.9%3.0%
Dextrose IV50%5%10%
Isopropyl alcohol99%0% (water)70%

Article — Alligation Calculator

Alligation calculator: pharmacy compounding made simple

Alligation is a 14th-century arithmetic technique for mixing two strengths to hit a target. It works because the ratio of high-strength to low-strength parts equals (target − low) over (high − target). Pharmacists use it daily for compounding creams, oral suspensions, and intravenous solutions. The math has not changed in 700 years.

This alligation calculator solves the alternate form directly. Enter the higher and lower strengths, the target, and the total volume you need to dispense. The output shows the parts ratio, the exact volume of each ingredient, and a verified target concentration — a built-in sanity check before you compound.

What is alligation?

Alligation comes from the Latin alligare, meaning "to bind together." The technique was originally used in medieval European pharmacy and metallurgy to combine substances of different strengths or purities at a desired final value. It pre-dates algebra in widespread use and survives in modern pharmacy curricula because it is faster than equation-solving when working under time pressure.

Two varieties exist. Alligation alternate answers "how much of each do I mix?". Alligation medial answers "what strength did I end up with?" after mixing known quantities. Most calculator work is alternate.

The alligation alternate method

The core formula is a ratio of differences. If S_A is the higher strength, S_B the lower, and C the target, the parts of A required equal (C − S_B), and the parts of B equal (S_A − C). Total parts equal (S_A − S_B), the spread between the two strengths.

Alligation alternate
parts A: parts B = (C − S_B): (S_A − C)
volume A = parts A / total parts × V
volume B = V − volume A

The alligation grid method (tic-tac-toe)

Most pharmacy schools teach alligation visually as a tic-tac-toe grid. The higher strength sits in the top-left, the lower in the bottom-left, the target in the centre. Differences are subtracted along diagonals: target minus lower goes to the top-right (parts of A), higher minus target goes to the bottom-right (parts of B). The right column then reads off the mix ratio.

Did you know

The grid method has been verified for 5+ component blends in modern computational pharmacy. A 2024 Journal of Chemical Education paper described how pharmacy faculty re-introduced alligation alternate to undergraduate chemistry students as a fast mental tool for stoichiometry verification.

A pharmacy alligation example

A pharmacist needs 500 mL of 3% sodium chloride saline. Stock options: 0.9% saline (the usual diluent) and 23.4% concentrated saline. Target is 3%, halfway between the extremes but closer to the diluent.

Parts of 23.4% = 3 − 0.9 = 2.1 parts. Parts of 0.9% = 23.4 − 3 = 20.4 parts. Total = 22.5 parts. Volume of 23.4% = (2.1 / 22.5) × 500 = 46.7 mL. Volume of 0.9% = 453.3 mL. The verified target is (46.7 × 23.4 + 453.3 × 0.9) / 500 = 3.00% — correct.

Alligation vs simple dilution

Simple dilution is alligation with one component at 0% strength. The classic C₁V₁ = C₂V₂ equation handles this special case: stock + water. Alligation generalizes the same conservation law to any two strengths, neither of which has to be pure water or pure stock. The math reduces to dilution when you set S_B = 0.

Tip

Always verify with the medial check: total active mass before mixing equals total active mass after. If volume A times strength A plus volume B times strength B does not equal total volume times target, something is wrong. The calculator's "Verified target" cell does this for you.

Alligation medial: the reverse problem

Alligation medial calculates the average strength of an already-made blend. The formula is a weighted average: sum each component's volume times its strength, then divide by total volume. It is most useful as a verification step after compounding by alligation alternate.

For mixing 300 mL of 20% solution with 200 mL of 5%: mean = (300 × 20 + 200 × 5) ÷ (300 + 200) = 14%. The medial result confirms your alternate ratio came out as expected.

Where alligation breaks down

Alligation only works if the target falls between the two component strengths. You cannot make a mixture stronger than your strongest ingredient or weaker than your weakest. When the target is exactly equal to one of the strengths, the parts of the other ingredient go to zero — you do not need to mix anything.

Negative parts mean impossible target

If the calculator returns negative parts, the target lies outside the range [S_B, S_A]. The result is physically meaningless. Either dilute the stronger ingredient first, or source a different stock with the right strength.

Common alligation pitfalls

Three errors keep appearing in compounding logs. First, mismatched units — the strengths must share a unit (% w/w, % w/v, mg/mL — pick one). Second, calculating with the active drug's weight when the prescription is in solution strength, or vice versa. Third, rounding the parts before computing volumes, which compounds the error in the final volume.

  • Hydrocortisone cream — mix 2.5% with 0% base for any target between 0.1% and 2.4%
  • Dextrose IV — combine 5% (D5W) and 50% (D50) for 10–40% solutions
  • Isopropyl alcohol — dilute 99% to 70% for skin antisepsis using purified water
  • Mouthwash — blend 0.12% and 0.06% chlorhexidine for pediatric strengths
  • Saline — combine 0.9% and 23.4% for hypertonic 3% concentrations
  • Topical lidocaine — blend 4% and 2% for custom anesthetic strengths

The calculator handles the arithmetic; the clinical judgement stays with the compounder. Combined with the verification cell, alligation alternate remains the fastest method to mix two strengths to a target — exactly as it has been since the medieval apothecaries who first wrote it down.

Beyond pharmacy, alligation appears in food chemistry (mixing two ingredient strengths to a desired final concentration), winemaking (blending high- and low-alcohol vintages), photography (mixing two developer strengths), and metallurgy (the original 14th-century use — blending precious metals to a desired karat). The mathematics is identical regardless of substance.

Modern pharmacy schools still teach alligation alternate alongside algebraic solutions because the grid method scales better mentally when working under time pressure. A pharmacy technician filling a compound prescription can run an alligation calculation in 15 seconds with practice — faster than entering values into a spreadsheet or calculator. The visual grid serves as its own check: a missing diagonal jumps out as the answer is being read off.

One subtlety worth noting: alligation assumes ideal mixing where volumes are additive. For most aqueous solutions at typical concentrations this is a reasonable approximation. For mixtures involving alcohol and water, ammonia and water, or other hydrogen-bonding partners, the actual volume after mixing is slightly less than the sum of starting volumes (volume contraction). For high-precision pharmaceutical work involving alcoholic solutions, account for this by mixing slightly more than the calculated total and adjusting downward.

FAQ

Alligation is a 14th-century arithmetic method for combining substances of different strengths to reach a target concentration. Pharmacists use it daily for compounding creams, IV solutions, and oral suspensions where standard stock strengths must be blended.
Alternate solves for the ratio of components needed to hit a target strength. Medial works the other way — given the amounts and strengths you already mixed, it returns the weighted-average concentration of the final blend.
Write the higher strength top-left, the lower bottom-left, and the target in the middle. Subtract along the diagonals: target minus lower gives the parts of higher strength; higher minus target gives the parts of lower strength.
Alligation is a weighted average. You cannot create a mixture stronger than your strongest ingredient or weaker than your weakest — the math returns negative parts, which is physically impossible. The calculator flags this case.
Yes, but you pair them. Sort the strengths and pair the most extreme high with the most extreme low against the target. The 2024 Journal of Chemical Education paper on alligation alternate covers the multi-component generalization.
Strengths must share units (% w/w, % w/v, mg/mL, mEq/L — any unit works as long as both are the same). Volumes are independent and can be mL, L, gallons, or grams; the calculator returns the same unit you entered.
Yes. When the diluent strength is 0% (pure water or base cream), alligation reduces to the standard dilution equation C₁V₁ = C₂V₂. The calculator handles this case correctly — just enter 0 for the lower strength.
Multiply each component's volume by its strength, add the products, and divide by total volume. The result must equal the target. The calculator includes this verification automatically in the "Verified target" cell.