Professional Licensing & Applied Exam Math Pharmacy Licensing Calculations Alligation alternate; USP <795> compounding practice

Alligation Alternate Calculator

Alligation answers one question: you have a stronger preparation and a weaker one, you need a specific strength in between, so how much of each do you use? This calculator returns the parts, the quantity of each stock in grams or millilitres, a mass-balance verification that the mixture really is the strength you asked for, and the total active ingredient in the finished product. It also warns you when the target lies outside the two stocks, which is the case alligation cannot solve at all.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Higher strengthThe stronger of your two stock preparations. Use 100 for pure drug or pure active substance.10 %
Lower strengthThe weaker stock. Use 0 for an inert diluent such as white petrolatum, cream base or water.0 %
Desired final strengthThe strength you need to compound. It must lie between the two stock strengths.5 %
Total quantity to prepareGrams for a w/w preparation or millilitres for a v/v one; the arithmetic is identical either way.500 g

It returns

  • Quantity of the higher strength — Weigh or measure this much of the stronger stock.
  • Quantity of the lower strength or diluent
  • Parts of the higher strength
  • Parts of the lower strength
  • Ratio, higher to lower — How many units of the stronger stock go with one unit of the weaker.
  • Verified strength of the mixture — Recomputed from the two quantities by mass balance — it must equal your target.
  • Active ingredient in the finished product

The formula

Qhigh=QCClowChighClow
ChighQhigh+ClowQlow=CQ
C=CiQiQi

In plain text: parts_high = desired − lower; parts_low = higher − desired; Q_high = total × parts_high / (higher − lower)

  • C_highConcentration of the stronger stock preparation (%)
  • C_lowConcentration of the weaker stock or diluent (%)
  • CDesired final concentration, which must lie between the two (%)
  • QTotal quantity of finished product to prepare (g or mL)
  • Q_highQuantity of the stronger stock required (g or mL)

The parts are found by cross-subtraction: the difference on one diagonal gives the parts of the stock on the other. It is a rearrangement of the mass balance, not a separate rule.

Updated Category Pharmacy Licensing Calculations Verified against published test cases Reading time 12 min

What alligation is and when a compounder reaches for it

Alligation is a shortcut for the weighted average. You hold two preparations of known strength and you need a strength between them, so you have to decide the proportion in which to blend them. The full algebra is a two-equation mass balance; alligation collapses it to two subtractions.

It comes up daily in compounding. A prescription calls for 5% hydrocortisone ointment and the shelf holds 10% and 2.5%. A cleanroom needs 70% isopropyl alcohol and stocks 99%. A veterinary suspension has to be diluted from a human-strength product. In every case the finished quantity is fixed by the prescription and the only unknown is the split.

There are two forms of the calculation and they run in opposite directions. Alligation alternate — this page — starts from a desired strength and finds the proportions. Alligation medial starts from known quantities of known strengths and finds the resulting average strength. Medial is the verification step for alternate: work out the proportions, then recompute the strength from them and confirm you get back what you asked for. This calculator does both, and reports the medial result as a check rather than assuming its own answer is right.

The one thing alligation cannot do is produce a strength outside the range of the stocks. Blending anything between 20% and 70% gives you something between 20% and 70%. If the target sits outside, you need a different stock, and the calculator says so rather than returning a plausible negative quantity.

Why cross-subtraction works

Write the mass balance first. If you use Qh of the strong stock at Ch and Ql of the weak stock at Cl to make Q at C, then the drug going in equals the drug coming out:

Ch·Qh + Cl·Ql = C·Q, with Qh + Ql = Q.

Substitute the second into the first and rearrange, and you get Qh/Ql = (C − Cl) / (Ch − C). That is the whole of alligation. The numerator is how far the target sits above the weak stock, and the denominator is how far it sits below the strong stock — the two diagonals of the traditional tic-tac-toe layout.

The layout everyone is taught puts the strong strength top left, the weak strength bottom left, the target in the middle, and the differences on the right. The reason each difference is written on the opposite row is that the parts of the strong stock are governed by how far the target is from the weak one. If your target barely exceeds the weak stock, you need very little of the strong one — which is exactly what a small (C − Cl) says.

Once you have the parts, converting to quantities is proportional division: total parts is Ch − Cl, and each stock gets the batch size times its share. Nothing about the units matters, provided all three strengths are on the same basis. Percent w/w, percent v/v, mg/mL and ratio strengths all work — but you must convert them to a common basis first, because 1% w/v and 1% w/w are only the same thing when the density is 1.

Alligation medial runs the other way and needs no rearrangement at all: multiply each quantity by its strength, add, and divide by the total quantity. It handles any number of components, which is why you use it to verify a three-way blend that alternate cannot solve directly.

Worked example: 500 g of 5% ointment from 10% and 2% stocks

A prescription calls for 500 g of a 5% ointment. The shelf holds a 10% preparation and a 2% preparation of the same drug in the same base.

  1. Check the target is between the stocks. 2 < 5 < 10. ✓ Alligation applies.
  2. Parts of the 10% stock. desired − lower = 5 − 2 = 3 parts.
  3. Parts of the 2% stock. higher − desired = 10 − 5 = 5 parts.
  4. Total parts. 3 + 5 = 8, which is also higher − lower = 10 − 2 = 8. ✓
  5. Quantity of the 10% stock. 500 × 3 ÷ 8 = 187.5 g.
  6. Quantity of the 2% stock. 500 − 187.5 = 312.5 g. Cross-check: 500 × 5 ÷ 8 = 312.5. ✓
  7. Verify by alligation medial. Drug from the strong stock: 187.5 × 0.10 = 18.75 g. Drug from the weak stock: 312.5 × 0.02 = 6.25 g. Total drug = 25.00 g. Divided by 500 g of product = 0.05, that is 5%. ✓
  8. Sanity check the direction. The target 5% is nearer the 2% stock than the 10% stock, so most of the batch should be the weaker preparation — and 312.5 g of 500 g is 62.5%. ✓

A second case with a diluent. To make 1,000 mL of 70% isopropyl alcohol from 95% stock and purified water, the water counts as 0% and the parts are 70 − 0 = 70 of the alcohol and 95 − 70 = 25 of the water, out of 95 total parts. So 1,000 × 70 ÷ 95 = 736.84 mL of the 95% stock and 263.16 mL of water. Verify: 736.84 × 0.95 = 700.0 mL of absolute alcohol in 1,000 mL of product, which is 70%. ✓ In practice, mix alcohol and water by weight rather than by volume — the mixture contracts on mixing, so 736.84 + 263.16 mL will not measure out as exactly 1,000 mL.

How to check the answer before you weigh anything

The larger share goes to the stock the target is nearer. This is the fastest sanity check there is. If the target is 5% between stocks of 2% and 10%, it is 3 units above the weak and 5 below the strong, so the weak stock dominates. If your answer says otherwise, you have written the differences on the wrong rows.

The two quantities must sum to the batch size. Obvious, and worth doing every time, because the most common slip is computing both quantities from their own parts and getting a total that is not what was ordered.

Run the medial check. Multiply each quantity by its strength, add, divide by the total. If the result is not the target to within rounding, something is wrong. This calculator performs it automatically and reports the verified strength as a separate output rather than echoing the input.

Watch for quantities you cannot weigh. A class A prescription balance has a sensitivity requirement that puts a floor of about 120 mg on a directly weighable quantity at 5% error. If alligation gives you 40 mg of the strong stock, you do not weigh 40 mg — you make a larger batch and take an aliquot, or you use the aliquot method with a diluent.

Confirm the two stocks are truly compatible. Alligation is arithmetic; it does not know that an oil-in-water cream will not blend homogeneously with an anhydrous ointment, or that two vehicles have different pH. USP General Chapter <795> governs the practice side: compatibility, beyond-use dating, documentation and the master formulation record.

Common alligation problems worked out

Each row is parts by cross-subtraction, then quantities by proportional division. Verify column is (Q_high·C_high + Q_low·C_low) ÷ total.
StocksTargetBatchParts (high : low)Quantity highQuantity low
10% and 2%5%500 g3 : 5187.5 g312.5 g
70% and 20%40%1,000 mL20 : 30400 mL600 mL
95% and 0%70%1,000 mL70 : 25736.84 mL263.16 mL
100% and 0%2.5%60 g2.5 : 97.51.5 g58.5 g
1% and 0.1%0.25%120 g0.15 : 0.7520 g100 g
50% and 5%15%450 mL10 : 35100 mL350 mL
30% and 10%25%240 g15 : 5180 g60 g
20% and 0%20%100 g20 : 0100 g0 g

The 1% / 0.1% row shows why parts need not be whole numbers, and the last row is the degenerate case where the target equals the stronger stock and no diluent is used at all.

Compounding practice: USP General Chapter <795>

The arithmetic on this page is only the first step of a compounded preparation. USP General Chapter <795>, Pharmaceutical Compounding — Nonsterile Preparations, governs the rest: the master formulation record, the compounding record, ingredient identity and quality, equipment calibration, minimum weighable quantity, physical and chemical compatibility, beyond-use dating and labelling. Sterile preparations fall under <797> and hazardous drugs under <800>. A correct alligation does not make a preparation compliant; document the calculation as part of the compounding record.

Where alligation goes wrong

  • Writing the differences on the same row instead of diagonally. This reverses the answer, giving 312.5 g of the strong stock instead of the weak one. The nearest-stock sanity check catches it immediately.
  • Attempting a target outside both stocks. No blend of 20% and 70% is 80%. The algebra returns a negative quantity, which is the mathematical way of saying you need a different stock.
  • Mixing bases: percent w/w with percent w/v. They coincide only at a density of 1 g/mL. Convert everything to one basis before you subtract.
  • Forgetting that a diluent is 0% and a pure drug is 100%. Both are ordinary stocks in the calculation; leaving them out of the layout is a frequent examination error.
  • Weighing below the balance's minimum. Anything under roughly 120 mg on a class A balance exceeds the acceptable weighing error. Use the aliquot method instead of trusting the reading.
  • Assuming volumes are additive. Alcohol and water contract on mixing, so a hydroalcoholic preparation measured by volume will fall short. Work in weight, or make to final volume.
  • Using alligation alternate for three stocks. With three components the problem is underdetermined — many combinations satisfy it — so pair them off or set up the mass balance directly, then verify with alligation medial.

Alligation among the other dilution methods

Three related calculations cover most concentration work, and choosing the right one is half the battle.

Alligation alternate applies when you have two strengths and need a third between them, with the batch size fixed. The dilution equation C₁V₁ = C₂V₂ applies when one of your stocks is an inert diluent and you want to know how much stock to take — it is the special case of alligation with the weak stock at 0%, and it is quicker when that is genuinely the situation. Alligation medial applies when the quantities are already decided and you want to know the resulting strength, which is also how you verify the other two.

Sequential dilution is a fourth pattern used when the ratio is too large to do in one step, and the arithmetic there is multiplicative rather than proportional — the serial dilution calculation handles that case, which is standard in microbiology and analytical work. When the strength is expressed as milliequivalents rather than percent, as it is for most electrolyte injections, convert first with the mEq to mg conversion and then apply alligation to the resulting mg/mL figures.

Downstream, the compounded product still has to be billed, and the quantity you prepared becomes the quantity dispensed in the days supply calculation. If the preparation is for a child, check the final concentration against the intended dose with a weight-based dose calculation before compounding rather than after.

Key terms

Alligation alternate
Finding the proportions of two known strengths that give a desired intermediate strength. The differences are taken diagonally, which is where the name comes from.
Alligation medial
Finding the average strength of a mixture from known quantities of known strengths. A plain weighted mean, and the natural check on alligation alternate.
Parts
The relative proportions of the two stocks, obtained by cross-subtraction. They are dimensionless and are converted to quantities by proportional division of the batch size.
Diluent
An inert vehicle counted as 0% strength — white petrolatum, cream base, purified water, lactose. It participates in the calculation like any other stock.
Minimum weighable quantity
The smallest amount that can be weighed within an acceptable error on a given balance, roughly 120 mg on a class A prescription balance at 5% error. Below it, use the aliquot method.
Aliquot method
Preparing a larger, weighable quantity of a dilution and then taking a measured fraction of it, used when the required amount of a potent drug is too small to weigh directly.

Frequently asked questions

Why are the differences taken diagonally?

Because the parts of each stock are governed by the distance from the other stock to the target. Rearranging the mass balance gives Q_high/Q_low = (C − C_low)/(C_high − C): the numerator involves the weak stock and belongs to the strong one. Practically, if the target sits close to the weak stock you need very little of the strong one, and a small (C − C_low) is exactly what expresses that.

What if I need a strength stronger than both my stocks?

Then alligation cannot help, because any blend of two preparations lands strictly between them. You need a stronger stock — often the pure drug, entered as 100% — or you need to concentrate the preparation, which is a different operation entirely. This calculator returns no answer for an out-of-range target rather than a negative quantity, because a negative quantity of diluent has no physical meaning.

Can I use alligation with mg/mL instead of percent?

Yes. The parts come from subtraction, so any consistent concentration unit works — mg/mL, mcg/mL, ratio strengths, even mEq/mL — provided all three values are in the same unit. Convert first: 1% w/v is 10 mg/mL, and a 1:1000 ratio strength is 1 mg/mL. Mixing units is the error to watch for, not the choice of unit itself.

How do I handle three different strengths?

Alligation alternate is underdetermined with three stocks — many combinations give the same final strength, so there is no unique answer. The usual approaches are to pair two of the stocks first and treat the resulting blend as one component, or to fix the quantity of one stock and solve the remaining two-component problem. Whichever you use, verify the result with alligation medial, which handles any number of components directly.

What is the difference between alligation and the C1V1 = C2V2 equation?

C₁V₁ = C₂V₂ handles a stock diluted with something containing no drug, and it tells you the volume of stock to take. Alligation handles two stocks that both contain drug, and it tells you the proportion. They agree exactly when the weaker stock is 0%: with 95% alcohol diluted to 70% in 1,000 mL, alligation gives 736.84 mL and so does 95 × V = 70 × 1000. Use whichever is quicker for the case in front of you.

What do I do when the calculated quantity is too small to weigh?

Use the aliquot method. Weigh a larger, accurately weighable quantity of the potent ingredient, dilute it to a convenient total with an inert diluent, and take a measured portion of that dilution containing the amount you need. A class A prescription balance has a minimum weighable quantity around 120 mg at 5% error, so anything below that should not be weighed directly no matter what the calculation says.

Do the volumes of two liquids always add up?

No. Mixing ethanol and water produces a measurable contraction, so 736.84 mL of 95% alcohol plus 263.16 mL of water gives noticeably less than 1,000 mL. For hydroalcoholic preparations, either work in weight throughout or add the diluent to a graduate and make up to the final volume rather than measuring both components separately. For most aqueous and semi-solid preparations, the additive assumption is close enough.

How do I verify a compounded strength after mixing?

By alligation medial: multiply the quantity of each component by its strength, add the products, and divide by the total quantity of finished product. For the worked example, 187.5 × 0.10 + 312.5 × 0.02 = 18.75 + 6.25 = 25.0 g of drug in 500 g, which is 5.0%. Record that verification in the compounding record — it is the arithmetic proof that the batch is what the label says.

References

  • Pharmaceutical Calculations, 16th ed. — alligation alternate and medial — H. C. Ansel, Wolters Kluwer
  • USP General Chapter <795> Pharmaceutical Compounding — Nonsterile Preparations — United States Pharmacopeial Convention
  • Remington: The Science and Practice of Pharmacy, 23rd ed. — Academic Press / Elsevier