Maker Portal

View Original

Interactive MTA/New York MetroCard Calculator to Avoid Overpaying

See this content in the original post

Below, I outline the methods used in the above chart for avoiding leftover amounts when purchasing rides on a MetroCard, as well as thresholds for purchasing unlimited rides for both 7-day and 30-day passes.


See this content in the original post


The Metrocard bonus adds 5% to the total purchase price, which can be represented as follows:

See this content in the original post

So we follow all of MTA's rules (multiples of $0.05, 5% bonus) and we end up with only $0.01 leftover. If you want to test this, you can go to MTA's website and see their bonus calculator here or check out another calcualtor here (by panix.com).

See this content in the original post

See this content in the original post

Using the method above and an algorithm that optimizes cost and unlimited ride options, I created the interactive chart at the top of this page that shows subway riders when to buy single purchase amounts, 7-day unlimited passes, and 30-day unlimited passes. For cases beyond 7 days in the city, I have also included an optimized mix of single pay options and 7-day options. For amounts greater than the 30-day unlimited cost, I have recommended the 30-day unlimited pass. In every case, the chart shows the rider which option is financially advantageous based on the days in the city and rides per day.


See More in Programming and Python:

See this gallery in the original post