ojs' answer is the the more practical one most of the time, but if it's a used square taper crank and you absolutely have to land on the right chainline without a dummy bottom bracket to use, there is a way that doesn't require special tools.
Used square taper cranks have witness marks from the spindle. You can usually tell or get to a good inference where the tip of the spindle was. Hold the crank down flat against a flat surface. With a caliper or small ruler, measure from the surface to this witness mark. Then measure from the surface to the teeth centerline on the middle ring on a triple or the only chainring on a single, or to each chainring centerline on a double and then average them. Subtract the measurement to the spindle mark from the measurement to the front "chainline measurement plane," and you will usually get a negative number. That number plus half the length of whatever spindle you plug in will give you the resultant chainline. From there you can calculate what you need for your target rear chainline.
The biggest reason to not do it this way is many times you also need to worry about chainring and crank clearances in the bottom bracket area. Modeling that without having any kind of dummy BB to work with is time consuming and tricky, and very easy if you do have a dummy BB. But, there are also times when you have a pretty good idea that it's not going to be an issue.
Note that if you're singlespeeding an old double or triple crank and you want the ring mounted on the outside position to look cool and minimize your Q, that is an application where it's easy to have the crank hit the chainstay unless you model things carefully first and/or have a dummy BB to work with. If you're willing to sacrifice the Q and use the inside/middle position, usually you're then safe to not worry about clearances, but that's also not the "good" way of doing it for most people.
Another good reason to do it ojs' way is with a dummy BB, you'll know up front whether the cranks you have want an asymmetric spindle, which many old random cranks do. The counterpoint here is if you want to go really nuts, you can do the same witness mark trick but measured to the pedal mounting surface. (If it does need an asymmetric spindle, usually the way to solve it on a 68mm shell is use a 73mm BB and add spacers under the drive side cup equal to half the offset).