A birefringent ray-tracing package based on the mathematical software is established.The calculating method of wave aberration is also presented. Using the package, various aberrations for bifocus lens and the relationship between the aberrations and titled angle of incident beam are calculated. The advantage of the package is that the calculations of various physical quantities are quite distinct. These calculations provide a theoretical base for improving design of crystal element.