Knitting gauge, and why square graph paper lies to you
If you chart a circle on ordinary graph paper and knit it, you get an oval, wider than it is tall, by roughly a third. The chart was not wrong. Square paper was the wrong paper. You can download the correct knitting chart here.
A knit stitch is not a square
Usually, a knit stitch is wider than it is tall. The figure most often quoted is around 5 stitches to 7 rows over the same distance, which makes a stitch roughly three quarters as tall as it is wide. That's not exact, but rows are almost always packed closer together than stitches are. That means a design charted on square cells comes out flatter in the finished fabric than it looked on paper. It will be wider than it is tall, never the other way round.
What that does to a design
Charting a perfect circle on square paper and knitting it gives you a flattened oval. A square motif becomes a landscape rectangle. Lettering spreads sideways until it reads as an extended typeface. Diagonal lines change angle. The distortion is proportional, so it is worst on large motifs and nearly invisible on small ones, which is exactly why it catches people out: the swatch looked fine, and the sweater does not.
Measure your gauge; do not look it up
Gauge varies with yarn weight, needle size, fiber, stitch pattern and your own tension. Tension is personal enough that two knitters working the same yarn on the same needles routinely produce different gauges. The ratio has to come from your own swatch, not from a table. Knit a swatch a little larger than the area you plan to measure, in the stitch pattern you will actually use, then wash and block it exactly as you will treat the finished piece. Count the stitches and the rows over the same distance, well inside the edges. US patterns count over 4 inches and UK and European ones over 10 cm, and either is fine here. You need two numbers, and that pair is your ratio.
Turning the swatch into the right paper
The knitting chart generator takes those two numbers directly. Enter the stitch count and the row count and it sets the cell proportion to match: cells wider than they are tall, in exactly your ratio, so what you draw is what you knit. You never have to say which unit you measured in, because the units cancel out. 22 stitches by 30 rows gives the same chart whether you counted over 4 inches or over 10 cm. The best part is that there is no arithmetic to do. Colorwork knitting, such as Fair Isle, also benefits from customizable charts.
Blocking changes the answer
A swatch measured off the needles and the same swatch after washing and blocking can differ substantially, and the two directions do not move together. Wool relaxes and typically grows in width. Some fibers shorten. Cotton and linen behave differently again, and superwash wool can grow noticeably in both directions. Since the finished garment will be blocked, the blocked measurement is the one that describes reality. Measuring an unblocked swatch is the second most common cause of a chart that knits out wrong, after not swatching at all.
Crochet needs the opposite paper
The same logic runs the other way for crochet. Most crochet stitches are taller than they are wide. It's even more dramatic for double and treble crochet, so crochet chart paper uses cells taller than they are wide. How much taller depends heavily on the stitch, more so than with knitting, which makes swatching matter even more here. Filet crochet is the useful exception: its chart is built from squares of blocks and spaces that are close to square in the finished fabric, which is why filet crochet paper is ruled differently from general crochet paper.
Where square cells are still correct
As it turns out, though, not every needlecraft needs a customizable rectangular grid. Counted cross stitch on even-weave fabric or Aida really is square: one stitch covers the same distance in both directions. That's why cross stitch paper is square, and why needlepoint canvas paper is too. The rule is simply that the cell must be shaped like the stitch, and the only way to know the shape of your stitch is to make one and measure it.