The total cost of a 25 W average load magnetic refrigerator using commercial grade Gd is calculated using a numerical model. The price of magnetocaloric material, magnet material and cost of operation are considered, and all influence the total cost. The lowest combined total cost with a device lifetime of 15 years is found to be in the range $150-$400 depending on the price of the magnetocaloric and magnet material. The cost of the magnet is largest, followed closely by the cost of operation, while the cost of the magnetocaloric material is almost negligible. For the lowest cost device, the optimal magnetic field is about 1.4 T, the particle size is 0.23 mm, the length of the regenerator is 40-50 mm and the utilization is about 0.2, for all device lifetimes and material and magnet prices, while the operating frequency vary as function of device lifetime. The considered performance characteristics are based on the performance of a conventional A+++ refrigeration unit. In a rough life time cost comparison between the AMR device and such a unit we find similar costs, the AMR being slightly cheaper, assuming the cost of the magnet can be recuperated at end of life.