Integrating passive components on package is getting more and more attractive. To speed up the lumped-elements-based RF functional blocks, like filters, matching networks and so on, fast synthesis of these lumped elements is necessary. Traditional synthesis method like try-error-try again is not only time consuming but also hard to find an optimal one. This is especially true for spiral inductor design due to many tunable parameters. Design based on library has also some disadvantages, such as lack of information of manufacture tolerances impact. This paper describes an optimal synthesis method based on curve fitted formula. Full wave electromagnetic simulator is first used to model a set of typical structures. Curve fitting technique is then used to express capacitance, inductance, Q-factor, SRF as functions of geometric parameters and frequency, which is then integrated in a software tool for package inductor and capacitor design. With these fitted curves, manufacture tolerance analysis becomes very easier, and one can easily find the optimal design for the real application, therefore speeds up the function block design.