Alligation Calculator
Calculate mixing proportions with the alligation alternate and medial methods. Find exact ratios for pharmacy, chemistry, and food science blending.
About
Alligation is a centuries-old arithmetic technique for determining the ratio in which two or more ingredients at different concentrations must be combined to yield a mixture at a specified target concentration D. A miscalculation in mixing proportions leads directly to dosing errors in compounding pharmacies, off-spec batches in chemical manufacturing, or failed quality control in food production. This calculator implements both alligation alternate (finding unknown proportions) and alligation medial (finding the resultant concentration from known quantities). It enforces the fundamental constraint that the desired concentration must lie between the lowest and highest component concentrations. Results include the exact ratio, absolute quantities for a given batch size, and a verification check confirming Cresult = D within rounding tolerance.
The alligation alternate method works by computing cross-differences: each component receives parts equal to the absolute difference between the other component's concentration and the target. For multi-component systems, components are grouped above and below the target and paired systematically. This tool assumes ideal mixing (no volume contraction or expansion). For solutions where density changes significantly upon mixing (e.g., ethanol-water), apply density correction factors separately. Pro tip: in pharmacy compounding, always express concentrations in the same units (w/w, w/v, or v/v) before applying alligation.
Formulas
The alligation alternate method for two components with concentrations C1 (higher) and C2 (lower) to achieve desired concentration D:
For alligation medial, the resultant concentration from known quantities:
Quantity for a desired total batch T:
Where Ci = concentration of component i, Qi = quantity of component i, D = desired target concentration, T = total batch size, n = number of components.
Reference Data
| Application | Component A | Conc. A | Component B | Conc. B | Typical Target | Unit |
|---|---|---|---|---|---|---|
| Pharmacy: Hydrocortisone cream | Stock cream | 10% | Base cream | 0% | 2.5% | w/w |
| Pharmacy: Dextrose IV | D50W | 50% | D5W | 5% | 12.5% | w/v |
| Pharmacy: Alcohol dilution | Alcohol 95% | 95% | Purified water | 0% | 70% | v/v |
| Chemistry: Acid dilution | Conc. HCl | 37% | Water | 0% | 10% | w/w |
| Chemistry: NaCl saline | Hypertonic saline | 23.4% | Normal saline | 0.9% | 3% | w/v |
| Food: Sugar syrup | Heavy syrup | 65Β°Brix | Water | 0Β°Brix | 25Β°Brix | Brix |
| Food: Juice blending | Concentrate | 42Β°Brix | Water | 0Β°Brix | 11.5Β°Brix | Brix |
| Beverage: Alcohol blending | Vodka 40% | 40% ABV | Juice 0% | 0% ABV | 12% ABV | ABV |
| Agriculture: Fertilizer mix | Conc. NPK | 20%N | Filler | 5%N | 12%N | w/w |
| Metallurgy: Gold alloy | 24K gold | 999β° | Base metal | 0β° | 750β° | fineness |
| Cosmetics: Essential oil | Pure oil | 100% | Carrier oil | 0% | 2% | v/v |
| Paint: Color mixing (pigment) | Full-strength tint | 100% | White base | 0% | 15% | w/w |
| Lab: Buffer preparation | Stock buffer 10Γ | 10Γ | DI Water | 0Γ | 1Γ | fold |
| Fuel: Ethanol blend | Ethanol E100 | 100% | Gasoline E0 | 0% | 10% | v/v |
| Dairy: Milk fat standardization | Cream | 40% | Skim milk | 0.1% | 3.5% | fat % |