This paper describes a model for assessment of coastal and offshore shellfish aquaculture at the farm-scale. The Farm Aquaculture Resource Management (FARM) model is directed both at the farmer and the regulator, and has three main uses: (i) prospective analyses of culture location and species selection; (ii) ecological and economic optimisation of culture practice, such as timing and sizes for seeding and harvesting, densities and spatial distributions (iii) environmental assessment of farm-related eutrophication effects (including mitigation). The modelling framework applies a combination of physical and biogeochemical models, bivalve growth models and screening models for determining shellfish production and for eutrophication assessment. FARM currently simulates the above interrelations for five bivalve species: the Pacific oyster Crassostrea gigas, the blue mussel Mytilus edulis, the Manila clam Tapes phillipinarum, the cockle Cerastoderma edule and the Chinese scallop Chlamys farreri. Shellfish species combinations (i.e. polyculture) may also be modelled. We present results of several case studies showing how farm location and practice may result in significant (up to 100%) differences in output (production). Changes in seed density clearly affect output, but (i) the average physical production decreases at higher densities and reduces profitability; and (ii) gains may additionally be offset by environmental costs, e.g. unacceptable reductions in dissolved oxygen. FARM was used for application of a Cobb-Douglas function in order to screen for economically optimal production: we show how marginal analysis can be used to determine stocking density. Our final case studies examine interactions between shellfish aquaculture and eutrophication, by applying a subset of the ASSETS methodology. We provide a tool for screening various water quality impacts, and examine the mass balance of nutrients within a 6000 in 2 oyster farm. An integrated analysis of revenue sources indicates that about 100% extra income could be obtained by emissions trading, since shellfish farms are nutrient sinks. FARM thus provides a valuation methodology useful for integrated nutrient management in coastal regions. The model has been implemented as a web-based client-server application and is available at http://www.farmscale.org/.