In this article, we introduce an effective approach for dynamic impedance tuning of antenna matching circuits in both the transmitting and receiving modes. The tuning problem is described mathematically by a system of two nonlinear equations. These nonlinear equations are constructed by perturbing the tunable components of the matching circuit. We introduce a closed form solution to the proposed system of equations in addition to a numerical one. The outcome of our algorithm is the exact calculation of the instantaneous antenna input impedance. This impedance is then used to determine the optimal matching circuit values. The proposed algorithm takes place on the handset in real-time. Additionally, it does not limit the number of tunable components of the tunable matching circuit as the computational overhead is independent of their cardinality. The proposed approach can also be expanded to the case of real-time broadband tuning of antennas in a dynamic environment. © 2011 Wiley Periodicals, Inc. Int J RF and Microwave CAE, 2012.