Choose yarn and knitting needles that match the yarn weight
Measure the head circumference
Knit a gauge swatch
Cast on the required number of stitches
Join in the round if knitting circularly
Knit the brim in ribbing or another stretchy stitch
Continue knitting the body of the hat in the desired stitch pattern
Decrease stitches evenly near the top
Switch to double-pointed needles or use magic loop if needed
Cut the yarn, leaving a tail
Thread the tail through the remaining stitches
Pull tight to close the top
Weave in all loose ends
Block the hat if desired
