This paper derives the best linear unbiased predictor for an unbalanced nested error components panel data model. This predictor is useful in many econometric applications that are usually based on unbalanced panel data and have a nested (hierarchical) structure. Examples include predicting student performance in a class in a school, or house prices in a neighborhood in a county or a state. Using Monte Carlo simulations, we show that this predictor is better in root mean square error performance than the usual fixed- or random-effects predictors ignoring the nested structure of the data. This is applied to forecasting the productivity of public capital in the private sector using nested panel data of 48 contiguous American states. Copyright © 2013 John Wiley & Sons, Ltd.