A comprehensive, privacy-focused calculator for analyzing Bitcoin investment strategies alongside real estate refinancing decisions. This tool helps users model scenarios where Bitcoin holdings are used to optimize mortgage strategies.
For Property Owners: Model how Bitcoin investments could affect your refinancing strategy, including cash-out refinancing and HELOC scenarios. Calculate optimal payoff timing and risk assessment.
For Bitcoin Holders: Analyze how real estate leverage can be combined with Bitcoin appreciation to build wealth while managing debt payoff timing.
Core Analysis:
- Month-by-month cash flow projections over 20-30 years
- Bitcoin performance modeling with multiple scenarios (Bullish, Realistic, Bearish)
- Loan payoff optimization triggers (2x debt value, retained BTC amount, etc.)
- Risk assessment including market drawdown scenarios
- Property appreciation alongside Bitcoin growth
- 100% Client-Side: All calculations run in your browser
- No Data Collection: Your financial information never leaves your device
- No Analytics: No tracking, cookies, or data transmission
- Open Source: Full transparency with MIT license
- Future-Proof: Works offline, includes Bitcoin price fallback system
- Visit the Calculator: Deploy to any static hosting or run locally
- Enter Property Details: Current value, mortgage balance, monthly payment
- Choose Loan Strategy: Cash-out refinance or HELOC
- Set Bitcoin Parameters: Investment amount and growth scenario
- Analyze Results: View projections, charts, and risk assessments
The tool automatically fetches live Bitcoin prices from CoinGecko API. If the API is unavailable, it gracefully falls back to a manual input field pre-populated with $100,000 that you can adjust.
# Clone and install
git clone <repository-url>
cd KD_Bitcoin_RealEstate_Calc
npm install
# Development
npm run dev # Start development server at http://localhost:3000
npm run build # Build for production (exports to /out)
npm run test # Run test suite
npm run lint # Lint code
- Framework: Next.js 14 (App Router, Static Export)
- Language: TypeScript with strict type safety
- UI: React 18 + Tailwind CSS
- Charts: Recharts for data visualization
- API: CoinGecko integration with fallback
- Testing: Jest + React Testing Library
- License: MIT
- All calculations are client-side only
- No external data transmission of user inputs
- API calls only for Bitcoin price (optional)
- No analytics or tracking
- Prioritize accuracy and usefulness over complexity
- Graceful degradation when external services fail
- Mobile-responsive design
- Instant feedback and live calculations
- Bitcoin price fallback system for API outages
- Static deployment compatible (no server required)
- Progressive enhancement approach
- Comprehensive error handling
lib/calculations/
βββ comprehensive-amortization.ts # π₯ CORE: Monthly projections
βββ enhanced-bitcoin-performance.ts # π₯ CORE: Bitcoin modeling
βββ mortgage.ts # Loan calculations
βββ bitcoin.ts # Price scenarios
components/
βββ CalculatorForm.tsx # π₯ CORE: Input collection
βββ AmortizationResults.tsx # Results display
βββ AmortizationChart.tsx # Data visualization
βββ KrigerDanesHeader.tsx # Clean header
βββ KrigerDanesFooter.tsx # Legal disclaimers
- UI improvements and styling
- Additional Bitcoin price scenarios
- Enhanced chart visualizations
- New input validation
- Performance optimizations
- Documentation updates
- Calculation logic modifications
- Data flow between components
- Bitcoin price fetching system
- Form state management
- Type definitions
- Privacy guarantees (client-side only)
- Bitcoin price fallback system
- Core calculation accuracy
- Static deployment compatibility
- MIT license compliance
- Professional disclaimers
- Type Safety: All components must be fully typed
- Test Coverage: Add tests for calculation logic changes
- Error Handling: Graceful degradation for all external dependencies
- Performance: Calculations should be responsive (<100ms for UI updates)
- Privacy: Never transmit user financial data externally
- Multiple Scenarios: Bullish (60%β15%), Realistic, Bearish, Custom
- Cycle Awareness: Accounts for Bitcoin halving cycles
- Diminishing Returns: Models performance degradation over time
- Risk Management: Maximum drawdown scenarios (30-60%)
- Cash-Out Refinance: Complete mortgage restructuring
- HELOC Options: Home equity lines of credit
- Payoff Optimization: Smart trigger points for debt elimination
- Cash Flow Projections: Month-by-month analysis
- Market Stress Testing: Various Bitcoin crash scenarios
- Sustainability Analysis: Long-term holding viability
- Payoff Probability: Data-driven success metrics
- Retained Bitcoin: Shows remaining holdings after payoff
npm run build
# Deploy /out directory to any static host
# Works with: GitHub Pages, Netlify, Vercel, CDN, cPanel
The tool is designed to be deployed as a subdirectory alongside WordPress:
your-domain.com/
βββ wordpress-files/
βββ bitcoin_realestate_calculator/ # Deploy /out contents here
- MIT License: Free for commercial and personal use
- Attribution Required: Credit Kriger Danes LLC in derivative works
- Full License: See LICENSE file
- Educational and informational purposes only
- Not financial, investment, tax, or legal advice
- Users must consult qualified professionals
- Investments carry significant risks including loss of principal
We welcome contributions that maintain our core principles:
- User Privacy & Security: Never compromise client-side architecture
- Calculation Accuracy: Ensure financial projections are reliable
- User Experience: Intuitive, responsive, helpful
- Developer Experience: Clear code, good documentation
- Feature Additions: New capabilities that add value
- Read Architecture: Understand the system before changing it
- Check Tests: Ensure existing functionality isn't broken
- Add Tests: Cover new calculation logic with tests
- Update Docs: Keep documentation current
- Privacy Review: Verify no data leakage in changes
- Enhanced Bitcoin modeling scenarios
- Improved risk assessment tools
- Better data visualizations
- Mobile UX improvements
- Performance optimizations
- Documentation improvements
- Analytics or tracking additions
- External data transmission of user inputs
- Server-side calculation requirements
- Breaking changes to core calculation engines
- License violations or attribution removal
- Issues: Use GitHub Issues for bugs and feature requests
- Discussions: GitHub Discussions for questions and ideas
- Security: Private disclosure for security-related issues
- Full feature implementation complete
- Bitcoin price fallback system
- Professional legal disclaimers
- MIT license compliance
- Clean UI for public use
- Additional loan scenarios (VA, FHA, etc.)
- Enhanced visualization options
- Export capabilities (PDF reports)
- Historical backtesting features
- Advanced risk modeling
Built with privacy, accuracy, and user empowerment in mind.
For questions about the tool's financial concepts, consult with qualified financial professionals. For technical questions, see our documentation or open an issue.