Measure the pipe from the fitting’s socket depth—not the end of the pipe to the end of the world. I once cut a pipe so short it looked like a disappointed garden gnome. Use the hacksaw with steady, angry strokes, like you’re sawing off a bad hair day.
Pro tip: Mark your cut with a pencil. If you’re using a marker, the line will smudge when you sweat profusely from frustration. True story: a friend of mine cut three pipes wrong before noticing he was measuring the cat’s tail.