A simple, mobile-friendly web application that helps bar owners calculate how many drinks they need to sell daily to cover their fixed costs.
- Calculate daily drink sales needed to break even
- Mobile-responsive design
- Real-time calculations
- Form validation
- Clear error messaging
- Detailed results including:
- Profit per drink
- Total monthly drinks needed
- Daily drinks target
- Monthly costs breakdown
- Open
index.htmlin any modern web browser - Enter your costs:
- Monthly Rent ($)
- Monthly Labor Costs ($)
- Cost to Make One Drink ($)
- Selling Price Per Drink ($)
- Days Open Per Month (default: 30)
- Click "Calculate" to see your break-even analysis
- Profit per drink = Selling price - Cost to make
- Total monthly costs = Monthly rent + Monthly labor
- Required drinks per day = (Total monthly costs ÷ Profit per drink) ÷ Days open
- Single HTML file with embedded CSS and JavaScript
- No external dependencies
- Mobile-optimized inputs
- Responsive layout
- Accessible form controls with ARIA attributes
- Client-side validation
- Formatted currency output
Works in all modern browsers:
- Chrome
- Firefox
- Safari
- Edge
The calculator is available online at: https://lubakaper.github.io/BarBreakdownColculator/
This project is hosted using GitHub Pages. To set it up:
- Go to your repository on GitHub
- Click "Settings"
- Navigate to "Pages" in the left sidebar
- Under "Source", select "Deploy from a branch"
- Under "Branch", select "main" and "/ (root)" folder
- Click "Save"
Your site will be published at https://[username].github.io/BarBreakdownColculator/
For local development, you'll need to use a development server due to browser security restrictions when loading JSON files.
- Install the "Live Server" extension in VS Code
- Right-click on
index.htmland select "Open with Live Server"
python -m http.server 8000Then visit: http://localhost:8000
Install and run http-server:
npm install -g http-server
http-serverBarBreakdownColculator/
├── css/
│ └── styles.css
├── js/
│ ├── calculator.js
│ ├── neighborhoods.js
│ └── brooklyn-bar-data.json
└── index.html
Neighborhood comparison data is stored in js/brooklyn-bar-data.json. To update:
- Edit the JSON file directly
- Maintain the existing data structure
- Ensure all required fields are present for each neighborhood:
- avgCommercialRent
- avgDrinkPrice
- avgLaborCost
- displayName
MIT License - Feel free to use and modify for your needs.