Optimal design of a standalone wind-PV-diesel hybrid system is a multi-objective optimisation problem with conflicting objectives of cost and reliability. Uncertainties in renewable resources, demand load and power modelling make deterministic methods of multi-objective optimisation fall short in optimal design of standalone hybrid renewable energy systems (HRES). Firstly, deterministic methods of analysis, even in the absence of uncertainties in cost modelling, do not predict the levelised cost of energy accurately. Secondly, since these methods ignore the random variations in parameters, they cannot be used to quantify the second objective, reliability of the system in supplying power. It is shown that for a given site and uncertainties profile, there exist an optimum margin of safety, applicable to the peak load, which can be used to size the diesel generator towards designing a cost-effective and reliable system. However, this optimum value is problem dependent and cannot be obtained deterministically. For two design scenarios, namely, finding the most reliable system subject to a constraint on the cost and finding the most cost-effective system subject to constraints on reliability measures, two algorithms are proposed to find the optimum margin of safety. The robustness of the proposed design methodology is shown through carrying out two design case studies.