Engineering ProjectsBsc-ITDiplomaIT ProjectsMsc-IT Projects

Online Electricity Billing System


The digital age has revolutionized many aspects of our daily lives, including how we manage and pay for utilities. Our Electricity Billing System Project aims to simplify the process of electricity bill management and payment. Gone are the days of paper bills and manual calculations. With this system, you can view your electricity bill online and pay it instantly, all from the comfort of your home.


Admin Login

  • The admin has the ability to view and manage user accounts.
  • Electricity usage data for each user is input by the admin.
  • The system automatically calculates the electricity bill based on the usage data.

User Login

  • Users can log in to view their monthly electricity bill.
  • The bill can be paid online via credit card before the end of the month.
  • If the bill is not paid on time, the system calculates a fine for each subsequent day.


  • Electronic Record-Keeping: All records are stored electronically, eliminating the need for paper bills.
  • Automated Calculations: The system takes care of all calculations, reducing the chance of errors.
  • Convenience: Users can pay their bills online, without the need to visit an office.
  • Resource-Efficient: The system negates the need for a delivery person to distribute paper bills, saving both time and resources.


  • A reliable internet connection is required for both admin and users.
  • The system lacks a human interaction component for customer inquiries.

Technologies Used

  • Backend: Python for bill calculations
  • Frontend: Web-based user interface
  • Payment Gateway: Secure credit card transactions


Our Electricity Billing System Project is a step towards making utility management more efficient and user-friendly. It not only saves time but also resources, making it a sustainable choice for the future of electricity bill management.

Sample Code

First, install the required packages if you haven’t already:

pip install Flask
pip install Flask-SQLAlchemy
from flask import Flask, render_template, request, redirect, url_for
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///users.db'
db = SQLAlchemy(app)

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(50), nullable=False)
    electricity_usage = db.Column(db.Float, nullable=False)
    bill = db.Column(db.Float, nullable=False)

def index():
    all_users = User.query.all()
    return render_template('index.html', users=all_users)

@app.route('/add_user', methods=['POST'])
def add_user():
    username = request.form.get('username')
    electricity_usage = float(request.form.get('electricity_usage'))
    bill = electricity_usage * 0.12  # Assuming 0.12$ per unit
    new_user = User(username=username, electricity_usage=electricity_usage, bill=bill)
    return redirect(url_for('index'))

def pay_bill(id):
    user = User.query.get(id)
    user.bill = 0
    return redirect(url_for('index'))

if __name__ == '__main__':

And for the HTML (‘templates/index.html‘):

<!DOCTYPE html>
    <title>Electricity Billing System</title>
    <h1>Electricity Billing System</h1>
    <form method="post" action="/add_user">
        Username: <input type="text" name="username"><br>
        Electricity Usage: <input type="number" name="electricity_usage"><br>
        <input type="submit" value="Add User">
        {% for user in users %}
                {{ user.username }} - Bill: ${{ user.bill }}
                <a href="{{ url_for('pay_bill', }}">Pay Bill</a>
        {% endfor %}
Click to rate this post!
[Total: 0 Average: 0]

Download Online Electricity Billing System PDF

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button