Faced such a problem, while adding width in px is all right, and as a percentage some sort of nonsense comes out.
Each stage should be added 25% to the width of the progress bar
https://codepen.io/s0nly/pen/GMxPrX
function stepByStepForm() { var nextStepBtn = $('.next-btn'), prevStepBtn = $('.prev-btn'), step = $('.step'), stepField = $('.step__field'); nextStepBtn.on('click', function (e) { var progressBarValue = $('.progress-bar').width(), progressBarStep = parseInt(progressBarValue += 100 / step.length); e.preventDefault(); if($(this).parent().find(stepField).val().length <= 0){ alert('Не заполнены поля') } else{ $('.progress-bar').width(progressBarStep + '%'); step.fadeOut(0); $(this).parent().next(step).show(); } }); prevStepBtn.on('click', function (e) { e.preventDefault(); step.fadeOut(0); $(this).parent().prev(step).show(); }); } stepByStepForm();