@greenfieldoverride/runway-calculator
v1.0.1
Published
Transform financial anxiety into clarity - calculate your runway to freedom
Maintainers
Readme
Runway Calculator 🚀
Transform financial anxiety into clarity - calculate your runway to freedom
Stop wondering "How long could I survive without my job?" and start knowing. The Runway Calculator turns your financial anxiety into actionable clarity, showing exactly how long your savings will last and what you need to achieve freedom.
🌟 Features
- 🎯 Crystal Clear Results: "6 months, 2 weeks" instead of vague numbers
- 🔒 100% Private: All calculations happen in your browser
- ⚡ Lightning Fast: Instant results as you type
- 📱 Works Everywhere: React, vanilla JS, or pure logic
- 🧠 Smart Categories: Essential vs. nice-to-have expense tracking
- 📊 Liberation Insights: How reducing expenses extends your runway
🚀 Quick Start
Installation
npm install @greenfieldoverride/runway-calculatorReact Component
import { RunwayCalculator } from '@greenfieldoverride/runway-calculator/react';
function MyApp() {
return (
<div>
<h1>Calculate Your Runway to Freedom</h1>
<RunwayCalculator />
</div>
);
}Vanilla JavaScript
<div id="runway-calculator"></div>
<script src="https://unpkg.com/@greenfieldoverride/runway-calculator/vanilla"></script>
<script>
new VanillaRunwayCalculator({
containerId: 'runway-calculator'
});
</script>Core Logic Only
import { calculateRunway } from '@greenfieldoverride/runway-calculator/core';
const result = calculateRunway({
savings: 50000,
expenses: [
{ id: '1', name: 'Rent', amount: 2000, isEssential: true },
{ id: '2', name: 'Food', amount: 600, isEssential: true },
{ id: '3', name: 'Subscriptions', amount: 200, isEssential: false }
]
});
console.log(result.runwayDisplay); // "17 months, 3 weeks"
console.log(result.monthsTotal); // 17.86
console.log(result.essentialOnlyRunway); // "25 months" (cutting non-essentials)🔧 API Reference
calculateRunway(params)
Parameters:
savings(number): Total savings amountexpenses(array): List of expense objectsid(string): Unique identifiername(string): Expense nameamount(number): Monthly amountisEssential(boolean): Whether it's essential
Returns:
runwayDisplay(string): Human-readable runway (e.g., "6 months, 2 weeks")monthsTotal(number): Total months as decimalessentialOnlyRunway(string): Runway if cutting non-essentialsmonthlyTotal(number): Total monthly expensesessentialTotal(number): Essential monthly expenses only
🎯 Use Cases
- Job Transition Planning: Know exactly how long you can job hunt
- Sabbatical Planning: Calculate extended break feasibility
- Emergency Preparedness: Understand your financial cushion
- Liberation Timeline: Plan your escape from corporate burnout
- Expense Optimization: See which cuts extend your runway most
🤝 Contributing
This tool helps people escape financial anxiety. Every improvement matters:
- Fork the repository
- Create a feature branch
- Test thoroughly (this affects real financial decisions)
- Submit a pull request
📄 License
Licensed under Liberation License v1.0 - ensuring these tools serve human liberation, not corporate exploitation.
"Clarity is the first step to freedom."
