The solar-powered aircraft represents a major step forward in environmentally friendly vehicle technology. An unmanned aircraft vehicle (UAV) was designed to fly for 24 hours continuously to achieve surveillance at low altitude. It is a lightweight, solar-powered, remotely piloted flying wing aircraft that is demonstrating the technology of applying solar power for long-duration and low-altitude flight. Several programs and codes were used in the designing process of the UAV and generating its layout. A MATLAB computer programming code was written to optimize on various values of aspect ratio (AR) and wingspan (b) after setting the mission requirements and estimating the technological parameters. A program called Java Foil was used to calculate the lift. Another program called RDS was used to obtain the final layout of the aircraft. The great benefit is that the design is general enough to be applied to different values of aspect ratio and wingspan. Moreover, the analytical form of the method allows identifying clear some general principles like the optimization on various values of aspect ratio and wingspan, and the calculation of the lift.