---
tags: user stories
title: Final value calculator in Discord
description: A slash-command based computation bot that computes outcome of SIP /lumpsum / step-up SIP etc.
---
# Intro
We want to offer slash commands on Discord, that can be used to compute common one-off stuff in Discord itself.
At present, we are looking to offer these:
- Final value of an SIP (a garden-variety SIP calculator)
- Final value of a lumpsum investment (your common bank FD calculator)
- Final value of a step-up SIP
In future, we can probably build a goal-planner, but we can get to those eventually, and not in scope for current exploration.
:::warning
In this doc, we want to discuss only for SIP calculator, and cover the other two (Lumpsum & SIP step-up) later.
:::
# Why
- These calculations need to be **commoditized**
With slash commands, we can put these right in the finger-tip of every member of our community.
No more googling for an SIP calculator, or a step-up SIP calculator, or an FD calculator.
It reduces the distractions, from a flow of conversations.
- It's often too easy to form wrong perception around assets, looking at only the _promised returns_.
Checking final value from two different assets, with different promised returns, can give perspective around real ROI of the extra effort / risk.
# Details
## SIP command
Command is `/sip` or `/dca`. Can be configured to have any variant as its name. But for now, let's proceed assuming it's `/sip`

**Invocation** User can invoke it by typing `/sip` or a sub-text of it and selecting the command from slash command pallette.
### Arguments & Usage
SIP calculators normally take 3 arguments:
- SIP amount (fixed) :arrow_right: `amount(₹)`
- Time period :arrow_right: `years`
- Rate of Return :arrow_right: `return`
[Sample SIP calculator](https://sipcalculator.in/)
In our case, we have the following default values:
| SIP Amount | Time Period | Rate of Return |
| -------- | -------- | -------- |
| 10k | 5 years | 10% |
:::info
These default values should be configurable, including currency. Possibly through some YAML config / JSON config file.
:::
### Sample invocation
| Command with Args | What it should do |
| -------- | -------- |
| `/sip` | Final value of SIP of 10k / month, for 5 years, 10% p.a. XIRR |
| `/sip amount(₹): 1500` | Final value of SIP of 1.5k / month, for 5 years, 10% p.a. XIRR |
| `/sip years: 3` | Final value of SIP of 10k / month, for 3 years, 10% p.a. XIRR |
| `/sip years: 3 return: 15` | Final value of SIP of 10k / month, for 3 years, 15% p.a. XIRR|
| `/sip years:7 amount(₹): 40000 return: 8` | Final value of SIP of 40k / month, for 7 years, 8% p.a. XIRR |
### User Input Parsing
- **Amount**
| Input Value | ✅ / ❌ | Parsed Input |
| -------- | -------- | -------- |
| 5000 | ✅ | 5000 |
| 5,000 | ✅ | 5000 |
| 50,000,000 | ✅ | 50000000 |
| 5L / 5l | ✅ | 500000 |
| 5k / 5K | ✅ | 5000 |
| 50Cr. / 50 cr / 50Cr | ✅ | 500000000 |
| 7.8k | ✅ | 7800 |
| _random string_ | ❌ | default value |
| 0 | ✅ | 0|
| 0.89 | ✅ | 0.89 |
| 4000 INR | ✅ | 4000 |
| 0.0000000001 |✅| 0.0000000001 |
| (1+3i) | ❌ | default value |
**Input values can be arbitrary expressions as well**.
`3.5L + 1.2k - (1 + 4%)^68 + 12 Cr.` should be a valid expression as input.
- **Years**
| Input Value | ✅ / ❌ | Parsed Input |
| -------- | -------- | -------- |
| 5 | ✅ | 5 |
| 5yr / 5Y / 5 years / 5 year / 5 yr | ✅ | 5 |
| _random string_ | ❌ | default value |
| 4.2 | ✅ | 4 years 2 months |
|5yr 3mo / 5yr 3m / 5yr 3M | ✅ | 5 years 3 months |
Any arbirary date range, should be fine too. For instance, `1/1/2018 - 1/6/2026` is a valid range, and parser should compute SIP final values correctly.
- **Rate of Returns**
| Input Value | ✅ / ❌ | Parsed Input |
| -------- | -------- | -------- |
| 14 | ✅ | 14.0 |
| 12.245738849 | ✅ | 12.25 |
| 12.652463 | ✅ | 12.65 |
| 5.6% | ✅ | 5.6 |
| 4.98% p.a. | ✅ | 4.98 |
| _random string_ | ❌ | default value |
Any arbirary return range, should be fine too. For instance, `5%-8% p.a.` is a valid range, and parser should compute SIP final values correctly.
`p.m.` should also be allowed, in lieu of _per month_ rate.
---
# Outputs
This is where our SIP calculator gets a bit interesting.
We want to have the bot post _meaningful_ outputs.
One thing to keep in mind here: we would use some free-tier hosting. And it's to our own advantage, if most users won't need to use this beyond once / twice in the span of 10-15 mins.
Output should be:
- easy to read / understand
- give meaningful information, that covers the intent behind same search / invocation
When a user is asking _what would be value of SIP of 10k / month in 6 years at 12% p.a._, **they're not worried about exact final value**.
In this case, the exact value would be $1,057,570$. But this is of little interest to the user.
They'd want to know the range / ballpark. A better outcome is to report it as $10.6$L. Or, $10$L-$11$L.
Let's go further.
Why 10k? Probably user wants to start with a number for monthly amount. That's all.
Why 6 years? Most likely it's investment for a time-period between 5-7 years.
Why 12% p.a.? Most likely user thinks that's a rate of return that they can sustain over 6 years.
### A sample output

This covers:
- how the investment valuation changes with time
- how the investment valuation changes with returns
We didn't post a field-set with amount variation, because if the actual amount is different, user can mentally scale-up or down as needed.
For example, user might be doing an SIP of 30k / month, and if that's the case, they can mentally multiply by 3x and get a ballpark estimate.
We need **6 datapoints** for each variation, 3 in each row. These datapoints are not equi-distant.
For instance, if the return value is 10%+, we can go for difference of 2% plus-minus, both ways to get 6 data points.
But if it's below 10, we can do plus-minus of 1%. For example, is user requests estimate for 7% p.a. returns, we can do 6 data points of 4% p.a., 5% p.a., 6% p.a., 8% p.a., 9% p.a, and 10% p.a.
If it's below 5%, we can tweak the range to be of difference 0.5%.
For instance, if the user requests simulation for 2% p.a., we should execute for 0.5%, 1%, 1.5%, 2.5%, 3%, 3.5% p.a.
Similarly, for duration variation, we'd have to be somewhat intelligent in that aspect as well.
Someone asking for a 25Y estimate, should also see estimate of 10Y, 15Y, 20Y, 30Y, 35Y, 40Y.
But someone asking for an estimate of 5.2Y, should only see variation of 3Y / 4Y / 5Y / 6Y / 7Y / 8Y.
### Extra
Ideally, we'd want to plug a link to a HTML-CSS-JS based page, where user can play with actual SIP calculator.
TBD on that front.