Endpoint
GET or POST /api/v1/calculate/:kind
Every calculator behind LikeOptions' calculator pages is also available as a JSON endpoint. Pass numeric inputs as query parameters (GET) or a JSON body (POST); get back the same { primary, secondary } shape the browser UI computes from.
Returns { kind, result: { primary, secondary } }.
Example
curl example
Returns the same EMI result the /emi-calculator/ page computes.
Limits
Rate limiting and scope
This is a free v1 API, not a billed product. It is rate-limited to 120 requests per hour per client IP; requests beyond that return 429. There is no authentication and no API key — do not send personal data in requests.
All calculations run purely on numeric inputs with no persistence beyond the rate-limit counter. Option-strategy endpoints that take multi-leg position objects (the options builder, scenario lab) are out of scope for v1 and are not exposed here.
This is a calculation utility, not financial advice. Results are illustrative and depend entirely on the values you send.
Reference
Available kind values
mortgagehomePrice, downPayment, annualRate, years, annualTax=0Mortgage paymentloanamount, annualRate, monthsLoan paymentsavingstarget, current, annualRate, yearsSavings goalinflationamount, annualRate, yearsInflation-adjusted valuepercentageoriginal, newValuePercentage changecurrencyamount, exchangeRateCurrency conversionaffordabilityannualIncome, monthlyDebts, downPayment, annualRate, years, housingRatio=28, debtRatio=36Mortgage affordabilityamortizationamount, annualRate, years, extraMonthly=0Amortization schedule summaryrefinancingbalance, currentRate, currentMonths, newRate, newYears, closingCosts=0Refinancing comparisonemiamount, annualRate, monthsEMIapramount, fees, nominalRate, monthsAPR estimatecagrstartValue, endValue, yearsCAGRsipmonthlyContribution, annualRate, yearsSIP future valueretirementcurrentSavings, monthlyContribution, annualRate, yearsRetirement balancetaxgrossIncome, deductions, taxRate, credits=0Income tax estimate (jurisdiction-neutral)debtbalance, annualRate, monthlyPaymentDebt payoffemergencymonthlyEssentials, months, currentSavingsEmergency fund gapfireannualExpenses, withdrawalRate, currentSavings, annualContributionFIRE numberrentbuymonthlyRent, homePrice, downPayment, annualRate, yearsRent vs buycommoditycurrentHoldingsValue, monthlyContribution, annualRate, yearsCommodity value projectionhomeequityhomeValue, mortgageBalance, maxLTV=80Home equity availablevestingsharesGranted, currentSharePrice, vestingYears, yearsElapsed, cliffYears=1Stock grant vestingmarginequity, initialMarginPercent=50, maintenanceMarginPercent=25, existingLoanBalance=0Margin buying poweravgcostexistingShares, existingAvgCost, newShares, newPriceAverage cost basisstockprofitshares, buyPrice, sellPrice, fees=0Stock profit/losshypinvestinvestmentAmount, startPrice, endPrice, dividendYieldPercent=0, years=0Hypothetical investment growthwheelputStrike, putPremium, callStrike, callPremium, contracts, cyclesPerYearWheel strategy incomeoptionpricespot, strike, years, riskFreeRatePercent, volatilityPercentBlack-Scholes option pricefinancialhealthemergencyFundMonths, monthlyDebtPayments, monthlyIncome, monthlySavings, assetAllocationScoreFinancial health scoreppfannualContribution, annualRate, yearsPPF maturity valuefdprincipal, annualRate, years, compoundingsPerYear=4Fixed deposit maturityrdmonthlyDeposit, annualRate, monthsRecurring deposit maturityindiataxannualIncome, standardDeduction=75000India income tax estimate (new regime)gstbaseAmount, gstRateGST amount and totalFrequently asked
API questions
Does this API store the numbers I send?
No. Inputs are used only to compute the response for that request. The only thing persisted is a hashed IP address plus an hourly request count, used solely for rate limiting, and it is not linked to the calculation inputs.
Is there an API key or paid tier?
Not currently. v1 is free and unauthenticated, limited to 120 requests per hour per client IP. A metered or paid tier may be considered later, but is not part of this release.
Can I call this from a browser?
Yes. The endpoint sends permissive CORS headers so it can be called directly from client-side JavaScript on any origin.