100JSProjects
LearnProjectsExplore all projects
100JS_WORKSPACE/Build · Learn · Repeat
100JSProjects

Practical HTML, CSS, and JavaScript projects designed to help you turn concepts into real skills—one build at a time.

01Explore

./All projects./Learning guides./About./Contact./Privacy

02Resources

./GitHub repository./Support the project

© 2026 100 JS Projects. Built for developers.

TermsCookiesContact
JS//Projects/Basic Calculator

Basic CalculatorHTML, CSS & JavaScript Project

HTML5CSS3JavaScript
View Source CodeLive Demo
Basic Calculator project previewTry Live Demo
What you'll build

Basic Calculator

Let's create a sleek and modern calculator with all necessary buttons including numbers, operators, equal sign, and clear button. Type any arithmetic expression and the calculator will solve it instantly. We'll use JavaScript's 'eval' function to evaluate the expressions. Also, we'll learn to add event listeners to buttons with a for loop. Expect hovering and shadow effects inside and outside some elements to enhance the design.

HTML
— Structure
CSS
— Design
JavaScript
— Logic
Complete project files

Build It from the Source Code

Create these three files, copy the code into each one, then open index.html with Live Server.

Project structure
basic-calculator/
├── index.html
├── style.css
└── index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Basic Calculator</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="calculator">
        <input type="text" id="result" readonly>
        <div class="buttons">
            <button class="clear">C</button>
            <button class="operator">/</button>
            <button class="operator">*</button>
            <button class="operator">-</button>
            <button class="number">7</button>
            <button class="number">8</button>
            <button class="number">9</button>
            <button class="operator">+</button>
            <button class="number">4</button>
            <button class="number">5</button>
            <button class="number">6</button>
            <button class="equals">=</button>
            <button class="number">1</button>
            <button class="number">2</button>
            <button class="number">3</button>
            <button class="number">0</button>
            <button class="decimal">.</button>
        </div>
    </div>
    <script src="index.js"></script>
</body>
</html>
JS// Related Projects

Keep Building with Similar Projects

Continue your learning journey with these handpicked projects that share similar concepts and technologies

Weight Converter project preview
HTMLCSSJavaScript

Weight Converter

Let's create a weight converter project that converts pounds to kilograms. The webpage features an input field where users can enter a weight in pounds, and the webpage automatically displays the equivalent weight in kilograms. After 10 seconds, the result is removed, and the input field is emptied using the 'set time out' method. We've also incorporated an error handling feature to handle negative input numbers. If the user enters a negative number, the webpage displays an error message, "Please enter a valid number." We'll learn how to handle error situations and remove the error message after two seconds using an event listener for the input field. The event listener will call a function that performs the desired actions.

View project
Temperature Converter project preview
HTMLCSSJavaScript

Temperature Converter

This project aims to create a temperature converter for beginners. The final version of the project includes three inputs for Celsius, Fahrenheit, and Kelvin temperature formats. When you change any of these inputs, for example, if you choose 100 degrees Celsius, you will see the equivalent Celsius value in Fahrenheit and Kelvin formats. Additionally, if you change one input, you will see a real-time change inside the other inputs. For instance, changing the Fahrenheit input to 100 degrees will show you that it is equal to 37 degrees Celsius and 311 Kelvin. To create this project, we will learn how to use an "onchange" event listener to track changes inside the inputs. We will also use the switch statement to track changes based on the name of the input we are working on. Additionally, we will use CSS to give the project a modern look, inspired by newMorphISM design. In summary, this project will help us learn how to create a temperature converter using JavaScript and CSS, and we will learn how to track changes using event listeners and switch statements.

View project
Tip Calculator project preview
HTMLCSSJavaScript

Tip Calculator

In this project, our aim is to build a modern tip calculator. The project's primary interface comprises a container labeled "Tip Calculator" with two input fields: one for the bill amount and the other for the tip percentage. The tip calculator has a modern design that is styled using CSS. We utilized JavaScript to obtain the values of the two input fields and calculate the total amount based on these values.

View project
{ }View All Projects