Practical guide

Calculate ZPL ^PW and ^LL from label size

In ZPL, ^PW sets print width and ^LL sets label length in dots. Converting physical dimensions at the target resolution gives reliable starting values for a test format.

Open the ZPL Label Size Calculator

Physical size to ZPL dots

For the calculator’s landscape option, physical axes are swapped first. Other rotation and origin commands may affect content placement in a real format.

^PW = selected-rounding(label width in mm × actual dots/mm)
^LL = selected-rounding(label height in mm × actual dots/mm)

Worked example: 4 × 6 inch label

Actual resolution^PW for 4 in^LL for 6 in
8 dots/mm^PW813^LL1219
12 dots/mm^PW1219^LL1829
24 dots/mm^PW2438^LL3658

100 × 50 mm example

On a 12 dots/mm printhead, a portrait label is exactly 1,200 × 600 dots, producing ^PW1200 and ^LL600.

If the size prints incorrectly

  1. Confirm actual dots/mm rather than relying only on nominal DPI.
  2. Calibrate for gap, notch or mark sensing.
  3. Check print mode, media tracking and maximum width.
  4. Inspect ^LH, ^LT, ^LS, ^FW and field-origin commands.

Important ^LL media behaviour

^PW sets print width. Zebra documents ^LL as required for continuous media; without the optional Y parameter it applies to continuous media by default. Gap and mark media may obtain length through calibration. Use ^LLy,Y only when the value should explicitly apply to all media, and validate it on the target printer.

Frequently asked questions

Do ^PW and ^LL define every boundary?

No. Printer limits, origins, rotations and field positions also control output.

Is this a ZPL renderer?

No. It converts dimensions into starting command values; validate the complete format separately.

Run the calculation

Use your own measurements in the browser-based calculator. Inputs are processed locally and are not uploaded to LabelOps Lab.

Open the ZPL Label Size Calculator

Related guides

Last reviewed: