Skip to content

Ansh340/Typing-Speed-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Typing Speed Test

📌 Project Overview

This is a browser-based typing speed test application that allows users to practice and improve their typing speed. The project dynamically loads random paragraphs, tracks user input, calculates WPM (Words Per Minute) and CPM (Characters Per Minute), and displays mistakes in real-time.

🚀 Features

  • Random paragraph loading each time
  • Real-time WPM calculation
  • Real-time CPM calculation
  • Mistake counter
  • Timer-based typing test
  • Active character highlighting
  • Input auto-focus when typing or clicking

🛠️ Technologies Used

  • HTML5 for structure
  • CSS3 for UI styling
  • JavaScript (Vanilla) for logic and functionality

📂 Project Structure

/typing-test
 ├── index.html
 ├── style.css
 └── script.js

⚙️ How It Works

  1. When the page loads, a random paragraph is selected and displayed.
  2. The user starts typing, and the timer begins automatically on the first keystroke.
  3. Each character is validated as correct or incorrect.
  4. Mistakes are counted and highlighted.
  5. WPM & CPM are calculated dynamically.
  6. When time runs out, the typing test stops.

🧠 Key Variables

Variable Description
timeLeft The remaining time of the test
charIndex Current typed character index
mistake Total mistakes made
isTyping Ensures timer starts only once

📊 Accuracy & Speed Calculation

  • WPM = ((Correct Characters / 5) / Time Spent) × 60
  • CPM = Correct Characters per minute

✅ Future Enhancements

  • Add reset/retry button
  • Add accuracy percentage
  • Add user score history
  • Add leaderboard
  • Mobile responsive improvements

📎 How to Use

  1. Open index.html in your browser.
  2. Start typing immediately when paragraph appears.
  3. Test ends when the timer reaches zero.

👨‍💻 Author

Developed by Ansh Kumar

📄 License

This project is open-source and can be modified or improved freely.

About

A browser-based typing speed test app to practice and improve typing skills, track mistakes, and calculate WPM & CPM in real-time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors