In this paper, a low-complexity closed-form formula for the outage probability of the energy-harvested direct and decode-and-forward (DF) relay-aided underlay device-to-device (D2D) communications in Nakagami fading channel is derived. By proposing a new procedure, the power splitting factor in simultaneous wireless information and power transfer (SWIPT) energy-harvesting system is easily found such that the transmit power of the transmitter node in the direct and the relay node in a relay-aided D2D communications is fixed in a pre-defined value. Using the proposed procedure, the obtained closed-form expression is valid for both energy-harvested and non-energyharvested scenarios. This formula is based on n-point generalized Gauss-Laguerre and m-point Gauss-Legendre solutions. It is shown that n is more effective than m for reducing the formula complexity. In addition to a good agreement between the simulation results and numerical analysis based on normalized mean square error (NMSE), it is indicated that (n, m)=(1, 4) and (n, m)=(1, 2) are the appropriate choices, respectively for 0.5≤ µ <0.7 and µ ≥0.7, where µ is the fading shape factor. As shown in this investigation, increasing the average distance between the D2D pair and cellular user introduces lower interference, which is the reason for decreasing the outage probability. Furthermore, it is clear that increasing the Nakagami fading shape factor is the reason for decreasing the depth of fading, its fluctuations and the outage probability. Index Terms-Device to device (D2D) communications, Decodeand-forward (DF), Energy harvesting (EH), Simultaneous wireless information and power transfer (SWIPT), Gauss-Legendre/Gauss-Laguerre, Nakagami, Outage probability. Research works [2, 3], obtained closed-form formulas for the outage probability of direct underlay/overlay D2D communications in a Rayleigh channel. In Ref. [7], the exact formulas for the outage probability of in-band direct D2D communications underlying cellular network in a Rayleigh channel were proposed. The proposed model considers two radio resources reuse scenarios, one-reuse and two-reuse. The authors of [8] exploited stochastic geometry, Laplace transforms, and probability density function (pdf) to calculate the outage probability in a tractable manner.