How to Make a Calculator and Clock in command prompt

In this article I will explain how to make a calculator and clock from notepad. This calculator and clock will run in command promt(CMD). The calculator which we are going to make will be able to perform is capable of performing various mathematical operation.

Calculator are used in day to day life. But have you ever wondered that you can make your own calculator in notepad. You don’t have to use any kind of software in notepad for making a calculator. This batch file script of notepad do make use of some command prompt functions. like pause for delay in batch file.

Both calculator and clock comes under the batch file tricks for notepad. If you see these batch files you will surely say how funny these batch files are??? Nothing extraordinary but it really works..

This notepad tricks and hacks are really popular among all tech geeks. Do check this trick on your computer and make use of these funny notepad tricks.

Disclaimer: This notepad trick is not a virus. however it is suggested that you perform these trick after disabling your internet connection.

Notepad script for Making Calculator in notepad

Copy this script to your notepad and save it as calculator.batch . Do remember ‘file type’ while saving should be all files. If you forgot this option then this trick will not work.

@echo off
title Batch Calculator by TechGeekers
color 0c
echo ————————————–
echo -Welcome to Batch Calculator by Tech Geekers !-
echo ————————————–
echo Enter your Calculations
set /p sum=
set /a ans=%sum%
echo = %ans%
echo ————————————————————–
echo Previous Answer: %ans%
goto top

This will satisfy your request for queries like how to make a game in notpad, how to make a software in notepad etc. I hope now you know how to make a calculator from notepad. Do share your experience with us. we will love to hear all of those. Switch to next trick for making a clock from notepad.

In next tutorial you will be able to make a clock with just the help of a notepad. Your CMD will work as clock. This will not only show you time in hh:mm:ss but also in millisecond exactly without any lag. This will also make use of delay facility provided by command prompt with the help of pause function.

Another notepad tricks and hacks for you guyz. Just enjoy.

Show let’s start friends.
For making this clock, please follow below written steps.

Steps for making clock from Notepad

Step 1:

Firstly write down the following commands line in a new notepad file. This is also called as batch timer for windows users because it continuously shows time in command prompt for every millisecond.

 @echo off


echo Date:%date% Time:%time% via TechGeekers

 goto start


Save this file as clock.bat

Saving Window

Name can be as you want but remember to end it with .bat extension otherwise trick will not work. This extension .bat stands for batch file. This will make all the command get executed in runtime which are present in this batch file. There is no need to give another set of command again and again.


When you have saved this file. You will see a batch file icon on the same folder in which you make the clock file. Here is the screenshot of what it would look like.









Double click on this clock batch file. You will see the magic has just begin. You can see the picture of the time clock below.

CMD clock window

That’s it. This batch file tricks will work like the above screenshot. It has been working on our system as you can see. This will print time in your command prompt with some time delay. Although the clocking is not talking but you can see the time. A beautiful timer in command prompt with simple tricks.

Its not a notepad virus and will not harm your computer in any ways. I hope you know how to make this clock software in your notepad. Please do check out our other cool post on notepad tricks.

Hope you guys liked this post & if you did please tell us and like us on Facebook to get our daily tech tricks.

See another trick on notepad.

How to convert text to speech without any software.

About the author

Pushkar Kathayat

Pushkar Kathayat is the Chief Editor of TechGeekers. His passion is towards SEO, Online Marketing and blogging.