How do I calculate the cost of a 3D print once it's done?
For FDM printing: 

Both Cura and Makerbot Desktop (and perhaps others I'm not as familiar with) will give you a preview of both the length and weight of your print, including supports/rafts. Once the print is done you can weigh it on a kitchen scale.

PLA Filament currently runs about \$23/kg on Amazon, which works out to \$0.023/g. Multiplication can then give you a good estimate of materials costs for a print.

Only experience with your specific printer will give you an idea of how often you're going to hit a failed print, and how often you're going to need to replace parts. For wear and tear you could try using a depreciation model of 2-3 years, but that's only an estimate.