We present a method for calculating the sample size of a pharmacokinetic study analyzed using a mixed effects model within a hypothesis testing framework. A sample size calculation method for repeated measurement data analyzed using generalized estimating equations has been modified for nonlinear models. The Wald test is used for hypothesis testing of pharmacokinetic parameters. A marginal model for the population pharmacokinetic is obtained by linearizing the structural model around the subject specific random effects. The proposed method is general in that it allows unequal allocation of subjects to the groups and accounts for situations where different blood sampling schedules are required in different groups of patients. The proposed method has been assessed using Monte Carlo simulations under a range of scenarios. NONMEM was used for simulations and data analysis and the results showed good agreement. Copyright © Taylor & Francis Group, LLC.