Stitch count
This is the single biggest driver. An embroidery machine is billed by the time it runs, and that time is stitches. A small left chest logo might be a few thousand stitches, while a large back design can be tens of thousands, so the same logo costs very different amounts at different sizes.
Number of positions
Each position is a separate hooping and a separate run on the machine. A left chest logo alone is one run. Left chest plus a back logo plus a sleeve is three, and the price reflects three set-ups rather than one.
Design size and detail
Bigger designs need more stitches. Intricate designs also need more colour changes and more dense fill, which adds machine time even when the overall size stays the same.
Number of thread colours
Each colour change pauses the run. A two colour logo stitches faster than an eight colour one at the same size, so simplifying a design is often the cheapest way to bring a quote down.
Garment type and handling
Caps run on a special cap frame and take longer to load than a flat polo. Bulky items like jackets and overalls are slower to hoop, and awkward positions such as sleeves and collars add handling time.
Digitizing your artwork
A logo cannot be embroidered as a picture. It has to be digitized into a stitch file that tells the machine the path, direction and density of every stitch. This is a one off job per design, and once it is done the same file is reused on every future order at no extra cost.
Quantity
Digitizing and set-up are one off, so the more units you run against them the lower the cost per piece. The machine time per garment stays roughly the same, which is why embroidery does not fall in price as steeply with volume as screen printing does.
Thread and backing type
Standard polyester thread covers most jobs. Metallic and specialty threads cost more and run slower. Stretchy or lightweight fabrics also need a heavier stabiliser behind the stitching.