It is exceptionally difficult to measure where the spokes should go in an unbuilt wheel, and thus the need to measure the rim, hub, and use spoke calculators.
With a wheel that has already been built, if you have the broken spoke at the J-bend, measure it and it should be fine.
If you have a nipple, measure length of a spoke to the nipple, then add the length of the nipple. Usually the spoke should extend all the way through the nipple.
Generally all front wheel spokes are the same length.
For rear wheel spokes, you only have a right/left difference. It doesn't matter which direction they go through the flange.