Skip to content

Alligation Calculator — Mixing Ratio & Quantities

Calculate the ratio to mix a cheaper and a dearer ingredient, or a low and high concentration, to reach a target value, plus the exact amount of each needed.

Alligation Calculator

Enter the value of the cheaper ingredient, the dearer (more expensive) ingredient, and the target mixture value. The tool returns the ratio in which to mix them — and the exact amounts if you give a total quantity.

Input values

Results

Mixing ratio

Cheaper parts
10.00
Dearer parts
10.00
Ratio (cheaper : dearer)
1 : 1

Quantities

Cheaper quantity
50.00
Dearer quantity
50.00

Alligation cross

Mixture20.00Dearer30.00Cheaper10.00Dearer parts10.00Cheaper parts10.00

Alligation formula

10.00 : 10.00 = (30.0020.00) : (20.0010.00)

Mixture composition

Mixture composition
Donut chart: Mixture composition with 2 segments.50.0%50.0%20.00 parts
Loading calculator...
📚

Documentation

What is an alligation calculator?

An alligation calculator works out the ratio needed to mix two ingredients of different value into a blend that lands on a target value. The method behind it is called alligation. It applies to any two-part mixture, such as blending a cheap stock with an expensive one, or diluting a strong solution with a weak one, as long as both ingredients are measured on the same scale.

The alligation formula

Alligation compares three numbers on one consistent scale: a cheaper value C, a dearer (more expensive) value D, and a target mixture value M, where C is less than M and M is less than D.

1cheaper parts : dearer parts = (D − M) : (M − C)
2

Each ingredient's share comes from the distance on the other side of the target. The farther the target sits from an ingredient's value, the more of that ingredient the blend needs, because more of it is required to pull the average that far.

If a total quantity Q is also known, the amount of each ingredient is:

1cheaper amount = (D − M) / [(D − M) + (M − C)] × Q
2dearer amount  = (M − C) / [(D − M) + (M − C)] × Q
3

The alligation cross

The formula is traditionally drawn as a cross. The two ingredient values sit on the left, the target sits in the middle, and each diagonal difference is written on the opposite corner.

1Dearer (D) ─────╮        ╭───── (M − C) = dearer parts
2                 ╲      ╱
3               Target (M)
4                 ╱      ╲
5Cheaper (C) ─────╯        ╰───── (D − M) = cheaper parts
6

Worked example

Mix a 10ingredientwitha10 ingredient with a 30 ingredient to make a blend worth $20.

1cheaper : dearer = (30 − 20) : (20 − 10) = 10 : 10 = 1 : 1
2

The two ingredients are needed in equal parts. For 100 units total, that means 50 units of the 10ingredientand50unitsofthe10 ingredient and 50 units of the 30 ingredient. The average value of that blend is exactly $20.

Moving the target to $25 changes the ratio: (30 − 25) : (25 − 10) = 5 : 15, which reduces to 1 : 3. The target now sits closer to the dearer value, so the blend needs three times as much of the dearer ingredient as the cheaper one.

Alligation alternate and alligation medial

The method above is called alligation alternate: the two ingredient values and the target are known, and the ratio is unknown. The reverse problem is called alligation medial: the amounts and values of the ingredients are known, and the resulting mixture value is unknown. Alligation medial is a weighted average:

1M = (q1 × v1 + q2 × v2) / (q1 + q2)
2

The two methods check each other. Plugging the amounts an alligation-alternate calculation gives back into the weighted-average formula should return the original target value.

Where alligation is used

  • Pharmacy compounding. Blending a strong and a weak preparation, such as a 70% and a 20% solution, to reach a prescribed strength. The values are percentages or concentrations rather than prices, but the arithmetic is the same.
  • Retail and commodity pricing. Blending a cheap and a premium stock to hit a target selling price or unit cost.
  • Food, drink, and chemistry. Diluting or fortifying a solution to a target concentration, proof, or sugar content.

Because the rule only needs one value on a consistent scale, the same three numbers cover all of these cases.

How to use the alligation calculator

Enter the cheaper value, the dearer value, and the target mixture value, using the same unit for all three. Add a total quantity to see the exact amount of each ingredient needed. The target must sit strictly between the two ingredient values. If it equals or falls outside either one, no blend of the two ingredients can reach it, and the calculator shows an error message instead of a ratio.

Frequently asked questions

What happens if the target value is not between the two ingredient values? No mixture of the two ingredients can reach it. A blend of a 10itemanda10 item and a 30 item always has an average value between 10and10 and 30, so the calculator rejects targets outside that range.

Does the unit of measurement matter? No. The ratio depends only on the differences between the three values, so prices, percentages, and concentrations such as mg/mL all work, as long as all three inputs use the same unit.

Can alligation handle three or more ingredients? This calculator solves the two-ingredient case. Problems with three or more ingredients have more than one valid answer and are usually solved by pairing ingredients two at a time or by setting up linear equations.

Is alligation the same as a weighted average? They are inverse operations. A weighted average, also called alligation medial, turns known amounts into a mixture value. Alligation alternate turns a target value into the amounts needed to reach it.

Why is the method called alligation? The name comes from the Latin word alligare, meaning "to bind" or "to tie together," which describes how the method ties two values into one target ratio.

Sources