Vulnerability assessment of structures encounter many uncertainties like seismic excitations intensity and response of structures. The most common approach adopted to deal with these uncertainties is vulnerability assessment through fragility functions. Fragility functions exhibit the probability of exceeding a state namely performance-level as a function of seismic intensity. A common approach is finding some response points of the fragility function and then fitting a typical probability distribution like lognormal through curve fitting estimation techniques. Maximum-likelihood approach is a fitting method to find the probability distribution parameters. Performing this approach for distributions like lognormal which is defined by just two parameters are straight forward while for more complicated distribution which are based on additional characterizing parameters is not feasible, since this approach is based on minimizing an error function through classic mathematical approaches like calculating partial derivations. An applicable modification is to add an efficient optimization approach to determine maximum-likelihood function. In this article, an optimization algorithm is proposed with maximum-likelihood-estimation and the results indicate the efficiency and feasibility of future developments in finding the most appropriate fragility function.