What the numbers on a needle mean
Gauge is the thickness of the needle and the scale runs backwards, so a higher number is a finer needle. The millimetres are the length. The units on the barrel measure the liquid, not the needle.
General information about the equipment, not medical advice. The directions that came with your medicine and the person who prescribed it come first, every time.
Gauge is thickness, and bigger means finer
Gauge, written as a number followed by G, describes how thick the needle is. It runs backwards from what most people expect: 31G is finer than 29G, which is finer than 27G, which is finer than 23G. The number is roughly how many needles of that size would fit across a fixed width, so more of them means each one is thinner.
The practical trade is comfort against speed. A finer needle is noticeably more comfortable going in and takes longer to draw through, because you are pulling the same volume of liquid through a smaller hole. A thicker needle fills faster and is easier to feel. Nothing else changes.
Hubs are colour coded to ISO 6009, which is why a box of 23G needles has the same blue hub whoever made them. The colour is a convenience for reading a tray at a glance, not a rating.
Length is measured in millimetres or inches
The second number is how long the needle is, given in millimetres for short needles and sometimes in inches for longer ones. A 4mm pen needle and a 38mm intramuscular needle are doing completely different jobs.
Length decides which layer of tissue the tip reaches. That is a question for whoever prescribed the medicine, because it depends on the medicine and on you, not on a rule of thumb from a website.
The units on the barrel measure liquid, not the needle
A U-100 insulin syringe is graduated in units rather than millilitres. U-100 means the scale assumes a concentration of one hundred units per millilitre, so one hundred units fills exactly 1mL and a single unit mark is one hundredth of a millilitre.
This is why insulin syringes exist as a separate thing. At that volume a millilitre scale is unreadable and a unit scale is not. It also means a U-100 syringe and a U-40 syringe are not interchangeable: the same mark means a different amount of liquid. U-40 is mostly a veterinary concentration in Australia. Read the vial before you choose the syringe.
Luer-lock syringes are graduated in millilitres instead, because they are used for larger volumes where a unit scale would be meaningless.
Questions about this
If yours is not here, the contact form routes to the person who can answer it.