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 id="urzadzenie_1">
                    <td><input type="text" class="form-control" id="nazwa" placeholder="Podaj nazwę urządzenia"></td>
                    <td><input type="text" class="form-control" id="moc" placeholder="Podaj moc"></td>
                    <td><input type="text" class="form-control" id="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')
        var id = parseInt(row.attr('id').split('_')[1]) + 1;
        $('table:first').append(row.clone().attr('id', 'urzadzenie_' + id));
    });
    $('table:first').on('click', '[type="button"]', function() {
        var row = $("table:first tr:last");
        var id = parseInt(row.attr('id').split('_')[1]);
        if (id !== 1) {
            $(this).closest('tr').remove();
        }    
    });

    $("#oblicz").on('click', function() {

            
            var cena = $("#cena_energii").val();
            var moc = $("#moc").val();
            var czas = $("#czas").val();
        
            var zuzycie = moc * czas / 1000;
            var koszt = zuzycie * cena;
        
            $("#dzienna_energia").html((zuzycie).toFixed(2));
            $("#miesieczna_energia").html((zuzycie*30).toFixed(2));
            $("#roczna_energia").html((zuzycie*365).toFixed(2));
            $("#dzienny_koszt").html((koszt).toFixed(2));
            $("#miesieczny_koszt").html((koszt*30).toFixed(2));
            $("#roczny_koszt").html((koszt*365).toFixed(2));


}); });