The Danish Ministry of Culture has funded a project to set up a model for costing preservation of digital materials held by national cultural heritage institutions. The overall objective of the project was to increase cost effectiveness of digital preservation activities and to provide a basis for comparing and estimating future cost requirements for digital preservation. In this study we describe an activity-based costing methodology for digital preservation based on the Open Archice Information System (OAIS) Reference Model. Within this framework, which we denote the Cost Model for Digital Preservation (CMDP), the focus is on costing the functional entity Preservation Planning from the OAIS and digital migration activities. In order to estimate these costs we have identified cost-critical activities by analysing the functions in the OAIS model and the flows between them. The analysis has been supplemented with findings from the literature, and our own knowledge and experience. The identified cost-critical activities have subsequently been deconstructed into measurable components, cost dependencies have been examined, and the resulting equations expressed in a spreadsheet. Currently the model can calculate the cost of different migration scenarios for a series of preservation formats for text, images, sound, video, geodata, and spreadsheets. In order to verify the model it has been tested on cost data from two different migration projects at the Danish National Archives (DNA). The study found that the OAIS model provides a sound overall framework for the cost breakdown, but that some functions need additional detailing in order to cost activities accurately. Running the two sets of empirical data showed among other things that the model underestimates the cost of manpower-intensive migration projects, while it reinstates an often underestimated cost, which is the cost of developing migration software. The model has proven useful for estimating the costs of preservation planning and digital migrations. However, more work is needed to refine the existing equations and include the other functional entities of the OAIS model. Also the user-friendliness of the spreadsheet tool must be improved in future versions of the model. The CMDP is presently closing its second phase, where it has been extended to include the OAIS Functional Entity Ingest. This has also enabled us to adjust the theoretical model further, especially regarding the accuracy and precision of the model and in relation to the underlying parameters used in the equations, such as migration frequency and format complexity. Understanding the nature of digital preservation cost is prerequisite for increasing the overall efficiency, and achieving first quality for preservation of cultural heritage materials.