Covert x,y,z position to step motor position

Hello everyone! I would like to develop a robot arm like this:

now I'm still looking for the right project, but this looks good.
my question is:
there is a formula or library to calculate the correct position of all the motors to bring the arm to a certain position x, y, z?
thank you.

Read up on inverse kinematics.