A method of determining the size and trajectory of screws in pedicles during surgery, comprising generating a three-dimensional image of the bony spine hollowing out the vertebra in the image with cortical wall thicknesses selected by a surgeon determining the isthmus within each pedicle generating a straight line starting at the center of the isthmus and extending in opposite directions so that it is positioned concentrically within the pedicle without touching the walls thereof, the line terminating inside the vertebral body a predetermined distance from the anterior inner cortical wall and extending outwardly in the opposite direction to penetrate the posterior pedicle cortex expanding the line concentrically and radially to a cross sectional size that is less than that of the isthmus, the line being expanded into a cylinder that stops growing when any portion thereof contacts the inner cortical wall of the hollowed out vertebral body and calculating pedicle screw size and trajectory based on the cylinder.