function calculate () {
        var speed="";                        
        var ratio=document.getElementById('calculator').sprocket_1.value/document.getElementById('calculator').sprocket_2.value;
  	speed=document.getElementById('calculator').rpm.value*ratio/document.getElementById('calculator').engine_ratio.value*document.getElementById('calculator').diam_wheel.value*0.0252*3.14*60/1000;
        document.getElementById('calculator').result.value+="Передаточное отношение трансмиссии "+Math.round(1/ratio*10)/10+" : 1"+"\n";
        document.getElementById('calculator').result.value+="Общее передаточное отношение "+Math.round(1/(ratio/document.getElementById('calculator').engine_ratio.value)*10)/10+" : 1"+"\n";
        document.getElementById('calculator').result.value+="Скорость "+Math.ceil(speed*10)/10+" км/ч"+"\n";
        document.getElementById('calculator').result.value+="-----------------------------------------"+"\n";
 }
