Alligation Calculator

A pharmacist with a 90 percent cream and a 10 percent cream, who needs 1000 mL at 50 percent, does not guess the mixture: this free alligation calculator works it out in two subtractions. The answer is 40 parts of the stronger stock and 40 parts of the weaker stock, a ratio of 1 to 1, so 500 mL of each. Alligation is the shortcut for a weighted average, laid out as a cross, and it is the standard way pharmacy and laboratory work turns two stocks of different strengths into one batch of the strength in between.

The calculator takes four inputs: the stronger concentration, the weaker concentration, the desired concentration, and the total amount, with a choice of mL or g. It returns the parts of each stock, the ratio, the amount of each stock to measure out, and a mass balance check that proves the mixture really is the strength you wanted. The diagram shows the two beakers pouring into one, with the split between the two layers moving as the ratio changes.

Your Two Stocks and Target

All three concentrations must use the same unit and the same basis, such as percent weight by weight or percent weight by volume. The desired strength must lie strictly between the two stocks. The amounts add up to the total exactly, which assumes the volumes are additive, so for ethanol and water mixtures make the batch up to volume instead of adding the two volumes.

Ratio 1 : 1 50% mixture 40 parts stronger, 40 parts weaker STRONGER WEAKER MIXTURE 90% stronger 10% weaker 500 mL stronger 500 mL weaker Check: (500 x 90 + 500 x 10) / 1,000 = 50%
Your alligation
Parts of Stronger Stock
Parts of Weaker Stock
Ratio (Stronger : Weaker)
Amount of Stronger Stock
Amount of Weaker Stock
Mass Balance Check
Formula Used
The parts come from the diagonals of the alligation cross: the stronger stock gets the gap between the target and the weaker stock, and the weaker stock gets the gap between the stronger stock and the target. The two amounts always add up to the total you asked for, and the check row proves the mixture really is the strength you wanted.
MixtureStronger (%)Weaker (%)Desired (%)Stronger (mL)Weaker (mL)

Eight common pharmacy and lab alligations, each for a 1000 mL batch. The highlighted row matches your three concentrations: 90% and 10% to make 50% needs 500 mL of each.

Powered by Techraxy

Creator & Reviewer

Faiq Ur Rahman

Founder & CEO, Techraxy

Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

What is an Alligation Calculator?

An alligation calculator is a tool that finds the proportions in which two preparations of the same substance, at different strengths, must be mixed to make a third preparation at a strength in between. The method is called alligation alternate: alternate, because it starts from the two known strengths and the target and finds the quantities, as opposed to alligation medial, which starts from known quantities and finds the resulting strength.

The rule comes from the mass balance. Whatever active substance goes into the mixture must come out of it, so the amount of the stronger stock times its strength, plus the amount of the weaker stock times its strength, equals the total amount times the desired strength. Rearranged, the parts of the stronger stock equal the desired strength minus the weaker strength, and the parts of the weaker stock equal the stronger strength minus the desired strength. The two differences are read diagonally across the traditional alligation cross, which is why the parts of one stock come from the gap on the other side. If the strengths are in moles per litre rather than percent, the Molarity Calculator converts between the two ways of stating a concentration.

Alligation only works when the two stocks contain the same substance and their strengths are stated in the same unit and on the same basis, such as percent weight by weight or percent weight by volume. A 20 percent weight by weight ointment and a 20 percent weight by volume solution are not the same strength, and mixing them by this method would give the wrong answer.

How to Use the Alligation Calculator

Enter the stronger concentration, the weaker concentration, the desired concentration, and the total amount, then pick mL or g. The calculator updates as soon as you change any input, and the Calculate button runs it again at any time. The desired strength must lie strictly between the two stocks: equal to either one is an error, because it would mean using only one stock and no alligation at all.

Read the results in order. The first rows give the parts of each stock, then the ratio in its simplest form, then the amount of each stock to measure out in the unit you picked, then the mass balance check, and the formula row shows the exact form applied. The highlight sentence repeats the answer in plain words, with the inputs it used, so you can check that nothing was mistyped.

The diagram shows the stronger beaker on the left and the weaker beaker on the right, both pouring into the mixture beaker in the middle. The mixture beaker holds two layers: the stronger stock on top and the weaker stock below, and the boundary between them moves with the parts split, so a lopsided ratio looks lopsided. The side beakers fill in proportion to their shares too. The check line under the beakers proves the mixture: it shows the two amounts times their strengths, divided by the total, equalling the desired strength.

The Compare Cases tab puts eight common pharmacy and lab alligations side by side, each for a 1000 mL batch: zinc oxide ointment, lidocaine, alcohol, hydrocortisone cream, dextrose, ethanol hand rub, acetic acid and hydrogen peroxide. The row matching your three concentrations is highlighted. If your starting figure is a mass concentration in mg/L or g/L rather than a percent, the Mass Concentration to Molar Concentration Conversion Calculator takes it from there.

Alligation Calculator Formula

The formulas are: parts of the stronger stock equals C minus C2, parts of the weaker stock equals C1 minus C, and total parts equals C1 minus C2, where C1 is the stronger concentration, C2 is the weaker concentration and C is the desired concentration. Amount of the stronger stock equals its parts divided by total parts, times the total amount, and amount of the weaker stock equals its parts divided by total parts, times the total amount. The mass balance check is amount of stronger times C1, plus amount of weaker times C2, all divided by the total amount, which must equal C.

Written out for the defaults, 90 percent and 10 percent to make 50 percent: parts of the stronger stock are 50 minus 10, which is 40, and parts of the weaker stock are 90 minus 50, which is 40. Total parts are 90 minus 10, which is 80. The ratio is 40 to 40, which simplifies to 1 to 1. For a total of 1000 mL, the stronger amount is 40 divided by 80 times 1000, which is 500 mL, and the weaker amount is the same 500 mL. The check is 500 times 90 plus 500 times 10, which is 50,000, divided by 1000, which is 50 percent, exactly the strength wanted.

The parts are relative, not absolute, which is what makes the method flexible. The same 40 and 40 parts give 500 mL of each for a 1000 mL batch, 50 mL of each for a 100 mL batch, and 1000 mL of each for a 2000 mL batch, because each part is the total divided by 80.

Worked Example

Take 250 mL of 25 percent dextrose, made from 70 percent and 10 percent stock. First, parts of the stronger stock are 25 minus 10, which is 15, and parts of the weaker stock are 70 minus 25, which is 45. Total parts are 70 minus 10, which is 60. The ratio is 15 to 45, which simplifies to 1 to 3. Each part is 250 divided by 60, which is 4.1667 mL. The stronger amount is 15 times 4.1667, which is 62.5 mL, and the weaker amount is 45 times 4.1667, which is 187.5 mL. The check is 62.5 times 70 plus 187.5 times 10, which is 6,250, divided by 250, which is 25 percent.

A second check uses grams, for an ointment. Take 30 g of 2 percent hydrocortisone cream, made from 2.5 percent and 1 percent creams. Parts of the stronger cream are 2 minus 1, which is 1, and parts of the weaker cream are 2.5 minus 2, which is 0.5. Total parts are 2.5 minus 1, which is 1.5. The ratio is 1 to 0.5, which simplifies to 2 to 1. The stronger amount is 1 divided by 1.5 times 30, which is 20 g, and the weaker amount is 0.5 divided by 1.5 times 30, which is 10 g. The check is 20 times 2.5 plus 10 times 1, which is 60, divided by 30, which is 2 percent.

A third check shows a lopsided ratio. Take 500 mL of 28 percent lidocaine, made from 30 percent and 20 percent solutions. Parts of the stronger solution are 28 minus 20, which is 8, and parts of the weaker solution are 30 minus 28, which is 2. Total parts are 10. The ratio is 8 to 2, which simplifies to 4 to 1. The stronger amount is 8 divided by 10 times 500, which is 400 mL, and the weaker amount is 2 divided by 10 times 500, which is 100 mL. The target sits close to the stronger stock, so most of the batch is the stronger stock, which is exactly what the ratio says.

Benefits of Using an Alligation Calculator

The first benefit is speed without algebra. The mass balance is two equations, and alligation collapses it to two subtractions and a division, which is why pharmacy students are taught the cross before the equations. The calculator removes even the arithmetic, and the check row proves the answer, so a slip in the subtractions cannot pass unnoticed.

The second benefit is that the ratio is independent of the batch size. Once the parts are known, any total can be made by scaling: the 1 to 3 ratio for the dextrose example gives 62.5 and 187.5 mL for 250 mL, and 125 and 375 mL for 500 mL, with no new calculation. That matters in compounding, where the same prescription is made up in different quantities.

The third benefit is catching an impossible target before any stock is measured out. If the desired strength is outside the two stocks, or equal to one of them, no mixture of the two can produce it, and the calculator says so instead of returning a negative amount. A negative part is the arithmetic sign of an impossible request, and it is better found on screen than at the bench.

The fourth benefit is the check row, which is the mass balance itself. It multiplies each amount by its strength, adds them, and divides by the total, and the result must equal the desired strength. It turns the calculator from a black box into a verifiable step, which is what a compounder needs when the mixture is going to a patient.

Frequently Asked Questions

How do you calculate alligation?

Subtract the weaker concentration from the desired one to get the parts of the stronger stock, and subtract the desired concentration from the stronger one to get the parts of the weaker stock. Then divide each part by the total parts and multiply by the total amount. For 90 percent and 10 percent to make 50 percent, the parts are 50 minus 10, which is 40, and 90 minus 50, which is 40, so for 1000 mL you use 500 mL of each.

What is the difference between alligation alternate and alligation medial?

Alligation alternate starts from two known strengths and a target strength and finds how much of each to mix, which is what this calculator does. Alligation medial starts from known quantities of known strengths and finds the resulting strength, which is a weighted average: multiply each quantity by its strength, add them, and divide by the total quantity. The two run in opposite directions, and the first thing to decide in any problem is which direction it asks for.

Can the desired concentration equal one of the stocks?

No, it must lie strictly between them. If the desired strength equals the stronger stock, the answer would be all stronger stock and none of the weaker, and if it equals the weaker stock, the reverse. The calculator treats both as errors, because there is no mixture to calculate. If the desired strength is outside the two stocks altogether, no mixture of the two can reach it at all, and that is an error too.

Do all three concentrations need the same unit?

Yes, and the same basis as well. Percent weight by weight, percent weight by volume, mg/mL and molarity can all be used, but all three figures must use the same one, because the method works on differences and a common unit cancels out of the ratio. Mixing a weight by weight figure with a weight by volume figure gives a wrong ratio, and the calculator cannot detect the mismatch, so the basis must be checked before the numbers are entered.

Why do the two amounts sometimes not add up to the total?

They always do in this calculator, because each amount is its share of the total. In real mixing, though, the volumes of two liquids do not always add: mixing ethanol and water contracts, so 500 mL of ethanol plus 500 mL of water gives less than 1000 mL of mixture. For those mixtures the pharmacopoeial method is to mix the calculated amounts and then make the batch up to volume, rather than trusting the two volumes to add.

Calculator Sources

Wikipedia — Alligation, with alligation alternate and alligation medial defined, the diagonal difference rule for the parts, and the note that the mixture strength must lie between the strengths of its components.

Wikipedia — Concentration, with percent, molarity and molality defined, and the mass balance that underlies mixing calculations.

Wikipedia — Mixture, with homogeneous and heterogeneous mixtures defined and solutions described as homogeneous mixtures of solute and solvent.

Wikipedia — Dilution, with the dilution relation that concentration times volume is conserved when a solution is diluted, which is the same conservation alligation relies on.

LibreTexts — Units of concentration, with percent by mass, percent by volume, molarity and molality defined, and the worked conversions between them.

Disclaimer

This calculator finds the parts and amounts for mixing two preparations of the same substance to a strength between them, using the alligation alternate method, and it is for study, homework and general reference only. It assumes the two strengths use the same unit and the same basis, that the amounts are additive, and that the substances mix without reaction or volume change. Do not use it for compounding medicines for a patient without a pharmacist’s check, and if your course, your pharmacy or your lab uses a different method or a different basis, use that one instead of this calculator.

Last updated: 1 December 2026

ADVERTISEMENT

ADVERTISEMENT