# Total cost of ownership calculator

> Add the purchase price and running costs over a period to estimate total cost of ownership.

Estimate the real cost of an item by adding its price to the running costs over the years you keep it.

Purchase price ($)
Running cost per year ($)
Years kept
Calculate

(function(){var f=document.getElementById("tool-form");if(!f)return;f.addEventListener("submit",function(ev){ev.preventDefault();var p=Number(document.getElementById('price').value)||0;var a=Number(document.getElementById('annual').value)||0;var y=Number(document.getElementById('years').value)||0;var total=p+a*y;var out='Total cost of ownership: '+total.toFixed(2)+' over '+y+' year(s).';document.getElementById("tool-out").textContent=out;});})();
