Exports of dairy and sheep/beef products account for over 40% of New Zealand's aggregate merchandise exports. As a consequence, the performance of farms in these industries has a significant impact on the New Zealand economy. In this study, we link financial and agricultural data from the New Zealand Longitudinal Business Database (LBD) to estimate production functions of dairy and sheep/beef firms in New Zealand. Overall, we find that the data enables us to explain much of the industry-level variation in productivity and output, offering greater flexibility and insight than simply examining the official (aggregated) statistics. We find that variation in output can be largely explained by variation in capital, labour, intermediate expenditure, and productive land. We also find differences across industries in the way various farm practices (e.g. stocking rates, fertilizer use, supplementary activities, etc.) and area characteristics (including weather) relate to output. Finally, we find that estimating firm productivity at the industry level is less likely to accurately model the relationships for some sub-groups of firms (e.g. firms with different land size). We believe that our methodology could be useful for future studies addressing research questions relevant to this sector.