DEV Community

Cover image for How I Built a Chrome Extension for Smarter Betting: The Value Bet Calculator
Oscar Williams
Oscar Williams

Posted on

How I Built a Chrome Extension for Smarter Betting: The Value Bet Calculator

The Idea

As a sports fan and data geek, I often wondered:

Is this bet actually worth it?

That’s how the Value Bet Calculator extension was born — a simple browser tool that helps you instantly calculate the expected value (EV) of a bet using the formula:

Value = (Estimated Probability × Bookmaker Odds) - 1
Enter fullscreen mode Exit fullscreen mode

How It Works

You can use it in two modes:

  • Manual Mode – Just input your odds and estimated probability
  • Auto Mode – Select a match, and it pulls real-time data from the odds API

Here’s what the manual calculator looks like:

<input type="number" placeholder="Bookmaker Odds" />
<input type="number" placeholder="Estimated Probability (%)" />
<button>Calculate</button>
Enter fullscreen mode Exit fullscreen mode

And here’s the core logic:

function calculateValue(probability, odds) {
  const value = (probability / 100) * odds - 1;
  return Math.round(value * 1000) / 10; // round to 1 decimal
}
Enter fullscreen mode Exit fullscreen mode

What It’s Built With

  1. Vanilla JavaScript
  2. Manifest V3 (for Chrome compatibility)
  3. HTML / CSS (no frameworks)
  4. Designed to work in Chrome, Firefox, Edge, and Opera

The extension is lightweight and doesn’t track or store personal data.

GitHub Pages Version (Try It Live!)

You can try the live version right here (no install needed):

Value Bet Calculator – Web Version

GitHub Repo

Feel free to fork or use the code in your own projects:
View on GitHub

Want to Learn More About Value Betting?

If you’re into football, basketball or hockey betting — check these:

Final Thoughts

This was a fun project that blends data, logic, and real-world use.

If you’re into building extensions or sports analytics tools, would love to hear your thoughts — or better yet, collaborate on the next version.

Thanks for reading!

Top comments (3)

Collapse
 
legaciespanda profile image
Ernest Obot

Amazing development

Some comments may only be visible to logged-in visitors. Sign in to view all comments.