With the falling cost of Distributed Energy Resources (DERs) and the shift from fossil fuel to renewable energy in many countries, the integration of DERs is expected to grow. This can lead to a wide range of problems in the power system, such as voltage violations, overloading of distribution lines, reverse power flow, etc. Therefore, it is imperative to account for these adverse effects of the integration of DERs on the distribution network and minimize their impact when calculating the Hosting Capacity (HC). Two algorithms are presented in this study derived from a novel modified iterative method and a novel Repeated Particle Swarm Optimization (RPSO) method for determining the HC for multiple DER units simultaneously or a single DER unit integrating into radial or mesh networks. These algorithms calculate the optimal HC based on six scenarios of annual load and DER generation profiles. The developed algorithms were tested on the IEEE 123 bus network, and their results were compared. For a large-scale DER case, the modified iterative method significantly outperforms both the PSO and the normal iterative method in terms of computation time (30 minutes versus 3 hours versus 6 hours, respectively). In the case of multiple DERs, the RPSO method is the only option, as the other two methods cannot simultaneously optimize multiple DERs. As a result, it has been concluded that it is necessary to select HC calculation methods carefully and in accordance with the application, as each method has its own strengths and weaknesses.