JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Kalkulator zużycia energii</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
    crossorigin="anonymous">

</head>
<body>

    <div class="container">
        <h1 class="h1 mb-4 text text-center">Kalkulator zużycia energii</h1>
        <div class="input-group mt-5 mb-3">
            <div class="input-group-prepend">
                <span class="input-group-text">Cena prądu:</span>
                <input class="form-control" type="text" placeholder="Cena za 1kWh" value="0.55" id="cena_energii">
            </div>
            <div class="input-group-append">
                <span class="input-group-text">zł/kWh</span>
            </div>

        </div>

    
        <table class="table mt-4 text-center">
            <thead>
                <tr>
                    <th>Nazwa</th>
                    <th>Moc [W]</th>
                    <th>Średni czas użycia [h]</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr class="urzadzenie">
                    <td><input type="text" class="form-control nazwa" placeholder="Podaj nazwę urządzenia"></td>
                    <td><input type="text" class="form-control moc" placeholder="Podaj moc"></td>
                    <td><input type="text" class="form-control czas" placeholder="Podaj czas"></td>
                    <td><input type="button" class="btn btn-sm btn-danger" value="X"></td>
                </tr>
            </tbody>
        
        </table>
   

        <button class="btn btn-primary mr-5" id="dodaj">Dodaj urządzenie</button>
        <button class="btn btn-success"...

JavaScript

$(function() {
    $('#dodaj').on('click', function() {
        var row = $('table:first tr:last')
        $('table:first').append(row.clone());
    });
    $('table:first').on('click', '[type="button"]', function() {
            $(this).closest('tr').remove();   
    });

    $("#oblicz").on('click', function() {
            var cena = $("#cena_energii").val();
            
						const urzadzenia = $(".urzadzenie");
            let zuzycieSum = 0;
            for(let urzadzenie of urzadzenia) {
            	const moc = urzadzenie.querySelector(".moc").value;
              const czas = urzadzenie.querySelector(".czas").value;
              zuzycieSum += moc * czas / 1000;
            } 
            var koszt = zuzycieSum * cena;
        
            $("#dzienna_energia").html((zuzycieSum).toFixed(2));
            $("#miesieczna_energia").html((zuzycieSum*30).toFixed(2));
            $("#roczna_energia").html((zuzycieSum*365).toFixed(2));
            $("#dzienny_koszt").html((koszt).toFixed(2));
            $("#miesieczny_koszt").html((koszt*30).toFixed(2));
            $("#roczny_koszt").html((koszt*365).toFixed(2));


}); });