Wellbore trajectory optimization without instability well problems represents the most crucial factor in wells drilling planning and design today. Consequently, this article describes a method for designing and optimizing directional and horizontal well trajectories based on PSO algorithm technique of numerical optimization. The primary purpose of this article is to describe and optimum well trajectory design that at the lowest cost can hit the target objective. The design model relates to an actual well trajectory that has been drilled reference to a field geological data. The selected trajectories are S-type profile and double build horizontal trajectory based on field data analysis. The S-type profile has been design using explicit calculations and the double build horizontal trajectory has been design and optimize using numerical optimization technique (PSO algorithm).