In this paper we present a method to obtain the three-dimensional (3-D) solution of the Laplace equation in closed form suitable for semiconductor detector design. The method applies to planar geometry cases (microstrip detectors, pixel detectors, drift detectors, etc) with possible mixed boundary conditions on the surfaces of the wafer, The solution inside the detector volume is expressed by a series of elementary functions, The method requires lower CPU time and memory than methods based on 3-D discretization, in particular for the study of 3-D carrier trajectories inside the volume of semiconductor detectors and for inter-electrode capacitance calculations.