Skip to content
Methods

How our calculator works

Every formula, every rounding rule and every warning, with examples you can check on a pocket calculator.

Medical review in progressLast reviewed

Every Peptinote calculator runs on the same small piece of arithmetic. This page shows all of it: each formula, how we round to the marks on your syringe, when we warn you and why, and three examples you can check with a pocket calculator.

The basics: units, mL and U-100 syringes

Our calculators use U-100 insulin syringes, the kind marked in “units”. A unit is a measure of volume on the syringe, not an amount of medicine. How much medicine is in one unit depends on how concentrated your vial is.

We support the three common sizes:

SyringeHoldsMarked everyNumbered every
30-unit0.3 mL1 unit5 units
50-unit0.5 mL1 unit5 units
100-unit1 mL2 units10 units

Some syringes are marked differently (for example, some 30-unit syringes have half-unit marks). Always read the marks on your own syringe.

Mass is in milligrams (mg) or micrograms (mcg): 1 mg = 1,000 mcg. You can enter your dose in either; the answer is exactly the same.

Mixing a vial

You tell us three things: how much powder is in the vial, how much water you add, and your dose. Then we work through five steps.

  1. Find the concentration

    How much is in each mL once the powder is mixed.

    concentration (mg/mL) = powder in the vial (mg) ÷ water added (mL)

  2. Find the amount per unit

    Each unit is 0.01 mL, so one unit holds a hundredth of what a mL holds.

    mcg per unit = concentration (mg/mL) × 1,000 ÷ 100

  3. Work out the draw

    First in mL, then in units.

    draw (mL) = dose (mg) ÷ concentration (mg/mL)

    draw (units) = draw (mL) × 100

  4. Round to a mark

    You can only draw accurately to a printed mark, so we also show the nearest mark on the syringe you picked. See rounding to the marks.

  5. Count the doses

    We show the exact number, which can include a part dose (like 13.3), and the whole doses, rounded down (13).

    doses per vial = powder in the vial (mg) ÷ dose (mg)

How much water to add

If you’d like each dose to read a particular number of units, we work backward:

Water for a target reading

water (mL) = powder in the vial (mg) × units per dose ÷ (dose (mg) × 100)

The concentration this gives is dose (mg) × 100 ÷ units per dose. If you then put that water into the mixing calculator, each dose comes out at the units you asked for.

Pre-mixed vials

Some vials come as a liquid, labeled with a concentration such as “2.5 mg/mL”. There’s nothing to mix, so we skip the concentration step and use the number on the label. Everything else is the same.

To count doses we need the amount of liquid in the vial:

Doses in a pre-mixed vial

total in the vial (mg) = concentration (mg/mL) × liquid in the vial (mL)

doses per vial = total in the vial (mg) ÷ dose (mg)

If you don’t enter the amount of liquid, we don’t guess: the doses-per-vial line stays empty.

Blends

In a blend, every compound dissolves in the same water, so each one has its own concentration:

Each compound in a blend

concentration of each compound (mg/mL) = that compound’s mg ÷ water (mL)

amount of that compound in a draw (mg) = its concentration × units drawn ÷ 100

For example, a vial with 50 mg of compound A and 10 mg each of compounds B, C and D (80 mg in total), mixed with 4 mL of water, gives 12.5 mg/mL of A and 2.5 mg/mL of each of the others. A 20-unit draw (0.2 mL) then holds 2.5 mg of A and 0.5 mg of each of B, C and D. Numbers for illustration only, not a dose.

The converter

  • mg and mcg: multiply or divide by 1,000.
  • mL and units: multiply or divide by 100.
  • mg or mcg to mL or units: this needs your vial’s concentration, because a unit is a volume, not an amount. mL = mg ÷ concentration, and mg = mL × concentration. Without a concentration, we ask for one rather than guess.

Rounding to the marks

The exact answer is often between two marks, so we also show the nearest mark on your syringe.

  • 30 and 50-unit syringes: the nearest whole unit.
  • 100-unit syringes: the nearest even number of units (2, 4, 6…), because the marks are 2 units apart.
  • Exactly halfway: we round up. 12.5 units on a 30-unit syringe becomes 13; 13 units on a 100-unit syringe (halfway between 12 and 14) becomes 14.
  • Never zero: a draw that would round down to nothing is shown at the first mark instead, with a warning that it’s too small to measure.

30-unit syringe

Marks every 1 unit, so draw to 13 units

5101520253013 units

100-unit syringe

Marks every 2 units, so draw to 14 units

10203040506070809010014 units
An exact draw of 13 units on each syringe. Numbers for illustration only, not a dose.

We then tell you what drawing to that mark actually gives you:

What the mark delivers

amount delivered (mg) = units at the mark ÷ 100 × concentration

rounding difference = (units at the mark − exact units) ÷ exact units

A positive difference means slightly more than your dose; a negative one means slightly less.

When we warn you, and why

  • Check your numbers

    Stops the calculation
    When it shows
    A required number is missing, zero, negative or not a number.
    Why
    We’d rather show nothing than a wrong answer.
  • Your dose is more than the vial holds

    Serious
    When it shows
    Your dose is more than the whole vial contains.
    Why
    Usually a mix-up between mg and mcg, or a typo.
  • More water than the vial holds

    Serious
    When it shows
    The water is more than the vial size you entered.
    Why
    The vial physically can’t take it.
  • The draw doesn’t fit the syringe

    Serious
    When it shows
    The draw is more units than the syringe holds.
    Why
    It can’t be measured in one go with that syringe, so it’s worth checking the numbers with your pharmacist.
  • Too small to measure

    Caution
    When it shows
    The draw is under 2 units.
    Why
    2 units is only 0.02 mL. Being half a unit out on a 2-unit draw is a 25% difference, so very small draws are hard to measure reliably. Adding more water spreads the same dose over a larger volume, which makes each draw bigger. Any change is one to confirm with your pharmacist.
  • Rounding changes the dose

    Caution
    When it shows
    Drawing to the nearest mark changes the amount by more than 5%.
    Why
    5% is the point where we think the difference is worth knowing about. A syringe with finer marks, or more water, makes the rounding smaller.
  • Unusual amount of water

    For information
    When it shows
    Water under 0.3 mL or over 10 mL.
    Why
    These amounts are unusual for a single vial, so they’re more often a typing slip (for example, units entered as mL) than intended.

Serious warnings are shown first, then cautions, then information. Each warning appears once. Before changing anything about how you mix or measure, talk to your pharmacist or prescriber.

Three worked examples

Example 1: a 5 mg vial, no rounding

  • 5 mg vial
  • 2 mL water
  • 250 mcg dose
  1. Concentration

    5 mg ÷ 2 mL = 2.5 mg/mL

  2. Per unit

    2.5 × 1,000 ÷ 100 = 25 mcg per unit

  3. Draw

    250 mcg is 0.25 mg. 0.25 mg ÷ 2.5 mg/mL = 0.1 mL, which is 0.1 × 100 = 10 units.

  4. Marks

    10 is a printed mark on all three syringes, so there’s no rounding.

  5. Doses per vial

    5 mg ÷ 0.25 mg = 20 doses

Numbers for illustration only, not a dose.

Example 2: rounding on a 100-unit syringe

  • 5 mg vial
  • 2 mL water
  • 325 mcg dose
  1. Draw

    2.5 mg/mL, as before. 0.325 mg ÷ 2.5 mg/mL = 0.13 mL = 13 units.

  2. 30 or 50-unit syringe

    13 is a mark: draw to 13 units.

  3. 100-unit syringe

    The marks are 12 and 14, and 13 is exactly halfway, so we show 14 units.

  4. What 14 units delivers

    0.14 mL × 2.5 mg/mL = 0.35 mg (350 mcg).

  5. Rounding difference

    (14 − 13) ÷ 13 = +7.7%. That’s over 5%, so you’d see a “rounding changes the dose” caution.

  6. Doses per vial

    5 ÷ 0.325 = 15.4, so 15 whole doses.

Numbers for illustration only, not a dose.

Example 3: how much water for a 20-unit reading

  • 10 mg vial
  • 2 mg dose
  • 20 units per dose
  1. Water

    10 × 20 ÷ (2 × 100) = 200 ÷ 200 = 1 mL

  2. Concentration

    10 mg ÷ 1 mL = 10 mg/mL

  3. Check

    2 mg ÷ 10 mg/mL = 0.2 mL = 20 units

Numbers for illustration only, not a dose.

What the calculator doesn’t account for

  • Other syringes. The unit math is for U-100 insulin syringes only. U-40 and U-500 syringes use different scales.
  • Powder volume. We treat the liquid in the vial as the water you added. Dissolved powder can take up a little space too, so the true volume can be slightly more.
  • Liquid that can’t be drawn. Some liquid always stays in the vial and the needle, so the number of doses you actually get can be lower than the count shown.
  • Your syringe’s markings. We assume the marks described above. Read the marks on your own syringe.

Technical details

The engine is pure TypeScript with no dependencies. Every Peptinote calculator uses this same code, and the same inputs always give the same answer.

Order of operations. Every result is computed at full double precision from your inputs. Only then is each number tidied to a fixed number of decimals:

QuantityKept toShown on screen
Units0.0001 unit0.1 unit
mL0.000001 mL0.001 mL
mg and mg/mL0.0000010.001 mg, or 0.1 mcg below 1 mg
mcg per unit0.00001 mcg0.1 mcg
Rounding difference0.0001%0.1%
Doses per vial0.0001 doseas needed

These steps are far finer than anything a syringe can measure, and far coarser than computer rounding noise (around one part in 1016). Tidying removes that noise, so results read 0.3 rather than 0.30000000000000004. mL is always exactly units ÷ 100. A value that isn’t zero is never tidied to zero: anything smaller than these steps keeps 10 significant figures.

Marks. The nearest mark is found from the tidied units, so floating-point noise can’t push a value across a halfway point. Halfway values round up. A positive draw smaller than half a mark is shown at the first mark and flagged as too small to measure.

Whole doses are counted down from the tidied doses-per-vial figure, so 19.9999999 counts as 20.

Comparisons. A dose counts as more than the vial only when it’s larger by more than one part in 109, so 5,000 mcg against a 5 mg vial is never flagged.

Invalid input. A required number that’s missing, zero, negative, infinite or not a number stops the calculation. The result is all zeros with one “check your numbers” message naming every field to fix. Inputs or results larger than 1012 are refused as out of range. Results never contain “not a number”, infinity or negative zero.

Thresholds. Too small to measure: under 2 units. Rounding: more than 5%. Unusual water: under 0.3 mL or over 10 mL. Blends and reverse mode have no syringe choice, so the fit check uses the largest syringe (100 units).

Testing. Every formula, rounding rule and warning has automated tests, including hand-checked examples like the ones above, sweeps across thousands of input combinations, round trips (for example mg to units and back, and reverse mode back through the mixing calculator) and deliberately broken input. On October 15, 2026, the engine had 330 automated tests, covering every line and every branch of its code. The examples on this page are checked against the engine by tests too.