A professional flash photography calculator designed for both digital and analog photographers. Calculate optimal flash power, aperture, and distance combinations with ease.
- Digital Mode: Quick ISO adjustment on main screen
- Analog Mode: Set film ISO once in settings
- Distance-first workflow - set your target distance and get optimal settings
- Multiple viable power/aperture combinations
- Real-time calculations using Guide Number formula
- Quick Power Reference table with color-coded power levels
- Configurable Guide Number for any flash
- Custom aperture and ISO ranges
- Adjustable distance range (0.3m to 20m)
- Priority weights (power efficiency vs depth of field vs accuracy)
- Battery saving mode
- Offline-first: Works without internet connection
- Installable: Add to home screen like a native app
- Fast: Cached for instant loading
- Mobile-optimized: Touch-friendly sliders and controls
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/yourusername/flash-distance-calculator.git
cd flash-distance-calculator
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview-
Fork this repository
-
Update
vite.config.js:export default defineConfig({ base: '/your-repository-name/', // Change this to your repo name // ... rest of config
-
Enable GitHub Pages:
- Go to repository Settings โ Pages
- Source: "GitHub Actions"
-
Push to main branch:
git add . git commit -m "Initial deployment" git push origin main
-
Access your app:
- Your app will be available at:
https://yourusername.github.io/your-repository-name/
- Your app will be available at:
- Set your flash's Guide Number in settings
- Choose your photography mode (Digital/Analog)
- Set target distance with the slider
- Select from suggested aperture/power combinations
- Use the Quick Power Reference for at-a-glance power levels
- Guide Number: Enter your flash's GN (usually 30-60 for speedlights)
- Photography Mode:
- Digital: ISO controls on main screen
- Analog: Fixed ISO setting in preferences
- Available Apertures: Select which f-stops you use
- Distance Range: Set your typical shooting distances
- Priority Weights: Adjust recommendations (efficiency/DOF/accuracy)
The app uses the standard flash photography formula:
Distance = (Guide Number ร โ(ISO/100) ร โ(Power)) / Aperture
Unlike traditional flash calculators that require you to input power and aperture first, this app lets you:
- Set your desired shooting distance
- See all viable power/aperture combinations
- Choose based on your priorities (battery life, depth of field, etc.)
- Optimal: Best overall recommendation
- Perfect: Low power + deep depth of field
- Efficient: Battery-saving power levels
- Max DOF: Highest f-numbers available
- Deep DOF: Good depth of field options
Dynamic table showing:
- Your configured apertures (rows)
- Your distance range (columns)
- Color-coded power level bars
- Real-time calculations based on current ISO and GN
- React 18 - UI framework
- Vite - Build tool
- Vite PWA Plugin - Service worker and manifest
- Tailwind CSS - Styling (CDN)
- Lucide React - Icons
- Service Worker: Caches app for offline use
- Web App Manifest: Installable with app icons
- Local Storage: Persistent settings
- Responsive Design: Works on all screen sizes
- Chrome/Edge 88+
- Firefox 85+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Mobile)
- Full functionality without internet
- Settings persist between sessions
- Calculations work entirely client-side
- Service worker caches all assets
- Large touch targets for sliders
- Mobile-friendly button sizes
- Swipe gestures supported
- No accidental zoom on inputs
- Chrome/Edge: "Install" button in address bar
- Safari: Share โ Add to Home Screen
- Android: "Add to Home Screen" prompt
- Install once, works forever offline
- No data usage after initial install
- Perfect for location shoots without internet
- Set distance (1-3m)
- Choose f/2.8-f/5.6 for shallow DOF
- Get optimal power levels for soft lighting
- Configure 2-6m distance range
- Use f/4-f/8 for group shots
- Battery saving mode for long events
- Wide aperture range (f/2.8-f/16)
- Multiple flash units (different GN values)
- Precision distance calculations
- Set film ISO once per roll
- Clean interface without digital clutter
- Focus on aperture and power decisions
- Initial release
- Distance-first calculator
- Digital/Analog photography modes
- PWA with offline support
- Quick Power Reference table
- Customizable settings
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flash photography community for feedback and testing
- Open source contributors
- PWA community for best practices
- Issues: GitHub Issues
- Feature Requests: Create an issue with the "enhancement" label
- Documentation: See this README and inline help
- Update repository name in
vite.config.js - Update URLs in
index.htmlmeta tags - Test build locally:
npm run build && npm run preview - Check PWA features work in production build
- Enable GitHub Pages with "GitHub Actions" source
- Push to main branch
- Wait for Actions workflow to complete
- Test deployed app on mobile device
- Verify PWA installation works
- Test offline functionality
- Verify settings persistence
- Check on different devices/browsers
- Update README with actual deployment URL
Your app will be live at: https://yourusername.github.io/flash-distance-calculator/
Built with โค๏ธ for photographers who love the perfect exposure