ReCalc - An online mechanical design calculator with shareable URLs

Love the site! Any chance you might consider open sourcing it? I think it’d be fun to play around with locally and submit PRs for new features.


always has been :slight_smile:


This was a pretty quick implementation and I had some free time so I’ve implemented the custom belt input. Let me know if you find any issues.


This is fantastic! Thank you!

1 Like

The belt calculator now also tells you the teeth in mesh on the smaller pulley. I used this formula but I can’t seem to find any other sources with the same formula. There’s a bunch of sources for the angle wrap formula but I care more about tooth wrap. I could convert angle to teeth but that’s a lot of work for a Sunday afternoon.

Anyway, feel free to let me know if you find any issues.



Thanks to @abidingabi, the motor models now use experimental data from VEX rather than manufacturer theoretical data. Previously I was using theoretical data as VEX hadn’t tested/published results for the NEO and NEO 550 by that point in time, and I didn’t want to mix theoretical and experimental data. But it looks like they’ve published a bunch of results since then!

Wanted to post an update about this since your calculator results may change slightly with new motor data.

Somewhat related to VEX motor data is this thread: Getting accurate motor performance specs using, kv, and kt


Wanted to give you all some updates on what’s happening behind the scenes.

I’ve been working on catching up on unit testing, for both the math and the UI rendering, since I fell pretty far behind when I got caught up in implementing cool new features (as most devs do). There’s been some major headaches in attempting to unit test web workers, which are basically support for multi-threading in the browser, as they’re a pretty bleeding-edge feature in all JS engines, and I want to use them for long and CPU intensive calculations that don’t have simple, non-differential-equation closed form solutions (for example, simulating arm movement with gravity). But I do finally have that working which should speed unit testing up a bit.

I also rewrote how graphs/charts are rendered on the site. Previously I was using Chart.js version 2, but they recently released version 3 with a bunch of new features I want to try (like support for web workers). The wrapper I was using to draw Chart.js charts was pretty dead, and it didn’t look like it was going to support v3 anytime soon (and I had run into several issues with it in the past), so I culled that dependency and began generating graphs on my own. This resulted in me having to temporarily disable the DS log viewer, since it’s incredibly graphical (obviously), and it’s a large amount of work for something that people are not really currently using. It’s on the todolist to get it back up, but other stuff is a higher priority right now (simply due to how few people were using it anyway).

Once I get test coverage up much higher, I’m going to be converting the project from JavaScript to TypeScript. This should help prevent future bugs. I also think it may be possible to get compile-time unit-checking, however that’s a pretty heavy R&D endeavor that will take me learning more about TypeScript’s generic system in order for me to get working.

Since the belt calculator is currently the oldest calculator on the website, and I’ve learned a lot since writing it. There’s a lot of inefficient code going on with it. I’m probably going to re-implement it when I convert the project to TypeScript.

This may result in current links to the belt calculator not working in the future, due to changes in input types. I’m going to do my utmost to prevent this - I have a system already in place to help with these problems, which is why every copied URL has a version=1 parameter inside it. My idea is that I can “translate” URLs between multiple versions since the parameters will likely all be intrinsically related. I’m about 90% sure there won’t be any problems, but I figure I might as well put it out there now.

(To be fair, the site does have “Alpha” on the navbar, but, yeah. :slight_smile: )

The current pneumatics calculator is also a bit of a beast. It’s really really shoddily implemented, and I want to re-write it completely, including support for a variable number of pistons, rather than just up to 3. However, creating a UI for so many inputs is hard, and I’m an engineer, not an artist. If anyone has any ideas / sketches for improving the UI of the pneumatics calculator, please let me know!

Thanks all, congrats to all the winners of the various at-home challenges :slight_smile:


I’ve added some code to the belt calculator that will make the VBeltGuys links a bit less error-prone.

VBeltGuys URLs are easy to generate:

  1. Take the base URL (
  2. Add the length ( = pitch (in mm) * teeth) of the belt - say 300, for a 3mm 100t belt, and a hyphen.
  3. Add the pitch of the belt in mm (for our use cases, pretty much always 3 or 5), and another hyphen.
  4. Add the width of the belt, in mm, with a leading zero for single-digit numbers (for our use cases, pretty much always 09 or 15).
  5. Add -synchronous-timing-belt to the end.

Which for a 3mm pitch, 9mm thick, 100t belt yields

Super easy! This also helps us get around the fact that VBeltGuys sells an absolutely insane number of belts, and there’s no real inventory list available. It does mean that you may click on a VBeltGuys link on the Belt Calculator and find that its a 404, and that they don’t actually sell that belt, which is pretty tragic and a detail that you may gloss over until you have the design locked in and go to order the parts. Not bueno.

So I added some logic to help with this. Essentially, when generating the VBeltGuys links, the code now follows this flowchart:

*I know that this is not perfect, but it’s late, and the code for hiding it as soon as I check it is buggy and I can’t figure it out right now, so, I’ll fix it eventually :tm:.

The sheet that it pings is here, for anyone that wants a slowly-improving inventory of 3mm/5mm pitch 9mm/15mm wide VBeltGuys belts: V-Belt Guys Inventory - Google Sheets (or JSON format: recalc/vBeltGuysInventoryData.json at main · tervay/recalc · GitHub)

I’m planning on updating this inventory list weekly or so, as I already have a bot that makes pull requests to update my dependencies that I have to go in and merge every once in a while anyway, so the time investment is not that much more than what I already put into maintenance.

You will still get some 404s from VBeltGuys links now and then, but it should be much better than just completely guessing previously.

(Thank you VBeltGuys for setting the access-control-allow-origin header to * :pray: )


Small update if anyone enjoys reading these. (If any students (or mentors!) are interested in “large” scale project organization, FRC math, or ReactJS, feel free to PM me!)

I got tired of JavaScript (as one does) and started missing type systems. So I’m re-writing the entire site in TypeScript, from scratch. It’s not actually that much, as JS and TS are very similar, just that TS has… types. It’s also allowing me to clean up a lot of tech debt that I accrued as a beginner to React.

Most things will allow your URLs to be backwards compatible. Unfortunately, the pneumatics calculator probably won’t, but, everything else should.

These aren’t live yet and won’t be for a few months, because the amount of config to get JS and TS to interop together (the way that I’ve set up ReCalc’s JS version) would be a gigantic pain and simply not worth it. But they will be live before kickoff!

As I implied a couple lines up, the pneumatics calculator will be getting a big facelift and a bunch of improvements.

You can set up any amount of pistons that you want now. No longer limited to just 3 :tada:

The flywheel calculator is also getting some big improvements, where I’m essentially just implementing @dydx 's flywheel calculator. Huge thanks to Julia for making the original one and helping me understand the math.

The goal is for each calculator page to also have a documentation block that will somewhat/mostly explain the math that is going on.

There is also a motor playground now, thanks to a suggestion from @Nate_Laverdure .

You can set a current limit, voltage, and quantity for any FRC-legal motor and view the torque, current, and power vs RPM graphs for them. These are imperfect estimates, but mostly accurate.

Always open to more suggestions / feedback. Hope the site has been useful thus far!


I was looking at the Linear Mechanism Calculator for an elevator my team is designing. I notice that there is an input “Ratio”, which is supposed to be the gear ratio between the motor and spool. But the plot has “Ratio” as an independent variable, and changing the ratio input changes the plot dramatically. Am I misunderstanding what one of those ratios refers to?

You’re not, the graph X axis (ratio axis) changes based on the value you put into the ratio field. It tries to guess a range of inputs close to what you’ve put in, but it’s not very good at it. It’s not an overly amazing visualization.

The linear mechanism calc is pretty much the exact same as the one in jvn calc.

1 Like

Some generic updates from me:

I’ve been working on the Typescript rewrite behind the scenes for a while and have a lot of the infrastructure fleshed out now. I’ve also been fiddling with different hosting solutions (Render, Surge, Vercel) (currently prod is on Heroku) and so as a result it’s on a different repo. But it’ll be merged into the main repo soon.

The largest work I’m doing at the moment is testing. There are a few things I have to test for each calculator:

  • The actual math.
  • When changing an input’s scalar value on the page, the outputs should also change.
  • When changing an input’s unit value on the page, the outputs should also change.

The math tests are not that difficult. The UI testing, however, is extensive and verbose. There’s lots of ways to do it, and it’s a rather long process having to test so many combinations of different user inputs.

I wound up writing a couple Python scripts to auto-generate test stubs for me, then all I have to do is type in some numbers with what I expect the UI to display. Even though this is significantly faster than manually typing out every combination of user interactions, it still takes a while.

After testing is fully completed, ReCalc will exit alpha/beta stage and be fully released, whatever that means. I guess it just means a level of confidence in it being functional.

The current full-release-progress-tracker is here:

As you can tell, I’ve been putting off the UI testing :sweat_smile: . As for what this means for you guys:

  1. I need to finish the math tests for the linear calculator, (new) pneumatics calculator, and chain calculator.
  2. After that, I need to write up further documentation on those three as well.
  3. Once those are done, I will be merging the re-write into production. This will move ReCalc from alpha into beta. (This means its mostly feature complete, but not fully tested.)
  4. I will also be changing hosting platforms from Heroku to Vercel. Saves me some money and has a better feature set.
  5. This means I will have to change some domain settings, and as a result, the site may be temporarily offline.
  6. At this point, you’ll be able to use the rewritten version, which has a new pneumatics calculator, better motor specs visualization, better compressor specs visualization, a better belt calculator, a better arm calculator, and a wildly better flywheel calculator.
  7. From there on out, I’ll be working behind the scenes on the UI tests, which make sure that when you’re using the site, it’s not freezing or refusing to update the output fields.
  8. Once all that is done, ReCalc will be “fully released.” Whatever that means.

I am aiming to have all of that done by 2022 kickoff in a few months. This does mean I will have to temporarily scrap the gear load calculator, but it will be the first to return afterwards. In the meantime, if you’d like to use one, team 401 (@pchild) has the same calculator in spreadsheet form. There is some math I can do to make it a little bit more realistic, but it’s simply not a priority compared to the other calculators.

Anyway, that’s enough rambling for now. Typescript is great. React is great. Thank you all for using it and giving feedback. And extra thanks to the people I’ve been pestering with questions.


As a heads up, ReCalc will be going down sometime over Thanksgiving weekend in order to swap hosting services from Heroku to Vercel and deploy the rewritten TypeScript version.

Truthfully I have no idea how long it will be down because I’m an expert at messing up DNS settings. And it’s also a significant amount of change overall.


The new typescript version is deployed now - - and we are launched into beta :tada:

As expected, I messed up some DNS settings and it was down for a few hours, but honestly I didn’t mess it up as bad as I thought I would (I only messed up some settings about Cloudflare proxying DNS stuff). Vercel made it all super easy.

Notable changes:

  • Gear load calculator temporarily unavailable. I honestly have just not had much time to implement it alongside rewriting everything else and I’ve also joined a new team so I’ve been spending a lot of time on pre-season training with the kids.
  • Almost all calculators should have documentation at the bottom of the page explaining how they work. The only one that does not right now is the chain calculator. On the to-do list to fix that.
  • The pneumatics calculator has been completely rewritten and now supports any number of cylinders with customizable pressure settings.
  • The flywheel calculator has been massively upgraded and is essentially a web port of @dydx 's flywheel calculator. Huge thanks!
  • There is now a motor playground where you can view estimated motor curves for various motors at different current limits and voltages.

Please let me know if you run into any problems or if you have questions.


This is flipping awesome.


By happenstance I opened your chain calculator for an FTC application before you made this post of the new deployment and I was instantly impressed. The new site looks amazing, and the updates, extra features, and additions are fantastic! Excellent work!

This is potentially a game-changer in terms of accessability to robust technical calculations. The descriptions are also incredibly helpful, especially with the external links for more info.

The copy link feature is really slick and works really well at first glance. Makes it incredibly easy to share calculations with others.

The unit selection for all fields is extremely well done.

I REALLY love and appreciate that every single input field allows you to click on the label to get a quick description of what each value means. I wish my colleagues at work would do this in our custom spreadsheets and software.

I ran into a few bugs, at least on mobile, that might need looking into:

In the chain calculator, if you delete the values in the number of teeth fields it completely blanks the screen and you need to start over. Might be some weird dividy by 0/null error?

Most of the graphs are completely collapsed, or really tall and difficult to read. Specifically the motor playground graph is difficult to gain any insight out of. A drop down to choose which motor and what value to show sounds ideal.

Also a few suggestions:

On the main page, the description of the linked calculator page might be better above the image.

Having the ability to put in custom motor values expands the functionality of this calculator so much further than FRC. Many use JVN and other ccalculation spreadsheets generated by FIRSTers outside of the designing robots realm (I know I have).

Same as above goes for compressors.

I’m sure this will be added in time, but Rev and other vendors have more pulley and sprocket options that are not listed.

Having the sprocket or pulley list hide all of the other non-selected sprockets hide would be a neat feature that prevents scrolling through the table and trying to find the exact part.

Descriptions of the equations for items like MOI are helpful and useful, but showing how to measure them in solidworks or other CAD packages might be more helpful and prevent people afraid of calculations from getting overwhelmed. I haven’t manually completed an MOI calculation for anything more complicated than a ring since undergrad after knowing CAD does it faster and more consistently than I ever could.

The graphs are really nice and show a lot, but it would be cool to choose what is being displayed in them. You have arguably the most useful data, but a drop-down with different options could be nifty.

Based on my assumptions about how the copy link function work, it may not be too much of a stretch to have a login where individual sets of calculations can be labeled, saved, and stored on a user account to access at a later time. Users could add whatever calcs to whatever project they are working on and then shae the entire project and relevant calcs with others. Many vendors I work with have pages like this that are immensely helpful, specifically Intralox belting.

Keep up the fantastic work!


I appreciate this detailed and thought out response.

Lol yeah I’m 99% certain that’s a divide by zero error. With no value present, the input defaults to zero. This is an easy fix, I had just rewritten the chain calculator last and wanted to get the update out asap, so I definitely missed some if statements in there. I’ve skipped some unit testing & front end testing to get the update out sooner, which is why it’s still “beta” :wink:

I see that the graph is kinda impossible to analyze on mobile, it’s a lot better on desktop, the intended use case platform. I’m not really sure there’s a solution for the graph usability on mobile specifically. I will try out some alternative input methods for the motor playground. There’s likely a better way to do it, but will probably take some time to flesh out.

I hear the desire for this, and I can put it on the to-do list, however supporting FRC specifically is my highest priority, which includes adding new features to better help FRC teams, mentors, and students. I have an idea of how I can do this though and can attempt it in the near future and see if it works out.

Yeah, it’s been on the todo list for quite some time. There’s so many sprockets its hard to gather them all into one single document for organizing. It just takes time and is rather boring work which is why it hasn’t been fully completed. Automating it via scrapers is also a pain because there’s a multitude of vendors each with different page structures.

I see the origin of the idea but I think I’d rather bolden or italicize the selected one? I personally like seeing my other options if I’m realizing that a 24t pulley won’t fit in my geometry, for example, if that makes sense. Will fiddle with this as well.

I agree, however I need to know how to do something before I can explain it :wink: I only really have working knowledge of OnShape to be honest. I picked up Inventor for 3 months in 2020 and have never used SW so I would need community help on those.

Could you share some specific examples you might think of? There’s definitely a lot of room for that, however on the programming side, I worry it would get rather complex fast, just due to the way I’ve set it up. I can experiment with things, but performance is a significant concern, even though I do have charts mostly generated via webworkers in a separate thread now.

This was actually one of my original ideas, and I had a prototype of it sort of working (where you could log in with your google account) very early on, before I posted it anywhere. I wound up scrapping it because database management is honestly just a headache. I’m honestly just not confident in my ability to maintain a database such that I never run into migration issues on prod and wind up possibly jeopardizing user data. Additionally managing login page flows, db permissions, etc… It’s just a lot. I wanted to focus on making sure the calculators are the best they can be first. Maybe I will return to the account system idea one day.


Excellent job!!! Just started playing with the belt calculator, any possibility of a global units switch? I would think if a person wants to change units for target center, they probably want the same for all fields. I personally would prefer this. Thanks for sharing!

1 Like

I’m not entirely sure if Cyberphil was specifically mentioning the motor graphs page, but that’s what these comments will be on.

While you do have pop-up boxes/keys to display the value of the graph on hover, sometimes you want to compare different motor curves to each other simultaneously.

A suggestion for this would be to have those small boxes pop-up on the top right-hand side of the graph that would display a color and the matching thing (e.g. red circle and Falcon 500 power). Making the colors stronger than just a highlighted box would be great, too. Perhaps you could close the pop-ups on the top right as an extra feature.

That way if you want to compare a NEO to a Falcon you can just glance up to the top right for comparison to know what you’re looking at. And when you screenshot to send to someone else, they too can find the values instead of having to hover over it themselves.

Also if you want to spend time on it, a self-scaling graph that moves to show as little white empty space while still having all the motor curves shown would be fantastic. I know there’s zoom but I’m not sure about horizontal and vertical stretch independently. (If that was confusing basically have the graph stretch to show the curves best.)

Really nice website and great improvements! I really appreciate the documentation on the pages. I look forward to using your site.


Happy to help! This is apparently what a robotics mentor/fanatic does at 3am on Thanksgiving day…

I’m sure it is. I honestly have not seen the site on desktop, and I’m sure it’s generally a better experience.

Totally understood. Just a selfish suggestion so I can use this tool for work. :wink:

I know of at least 1 team that has this already. Ask @Snapdragon or someone else from 1403 if they would share their spreadsheet. It is quite complete in my experience.

That’s a great idea too! At least something to identify the right ones.

I’d be happy to sit down and show you how it works on each platform. It’s pretty similar in each system, though I think the Solidworks one is the most robust as you can change which coordinate axis you want to base it on as that changes the values significantly.

I did this with a bunch of scouting spreadsheets I created for 103 to compare specific data against different teams. So an example is 3 drop downs to compare 3 different teams and 3 other drop downs to compare 3 different sets of data (in 2019:hatch panels, cargo, hab climb, etc).

Generally the x axis would stay the same (time in most of the cases here), and the values on the y axis would be chosen from a matrix with a drop down menu. For example, instead of showing all of the motor curves in one graph, have a drop down to select one motor and another to select one of the curves. Or have 2 drop downs for the motors to show two of them.

Totally understood, that is a LOT more work, and certainly not necessary. I know nothing of backend programming, so it was just a suggestion based on my experience with other similar online tools.

If you can, check out the intralox one I suggested. It’s really powerful and has a lot of the ideas and features I’ve suggested.