Project

roth_ira

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Determines max Roth IRA contribution amount based on year, filing status, and MAGI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.3
 Project Readme

CircleCI Gem Version Code Climate

roth_ira

This Ruby gem allows you to calculate maximum Roth IRA contributions based on Modified Adjusted Gross Income (MAGI), Age, Filing Status, and Tax Year. Guidelines for these calculations were taken from the IRS Publications on Roth IRAs.

Contribution and income limits may vary every year, and thus changes to the code will be required. This gem is currently up to date for Tax Years 2015 - 2019.

Installation

In your gemfile, add

gem 'roth_ira', '~> 1.2.2'

then run bundle install.

Alternatively, you can manually install the gem.

gem install roth_ira

Usage

Version 1.0+

To calculate a contribution limit, initialize a new RothIRA object with the tax year. Then, call calculate_limit, and pass MAGI, filing status, age, and (optionally) spouse age.

> roth_ira = RothIRA.new(2017)
> roth_ira.calculate(75000, :single, 25)
5500
> RothIRA.calculate(75000, :married_filing_jointly, 25)
11000

Older versions

Next, call the method RothIRA.calculate_limit and pass four parameters: MAGI, filing status as a symbol (:single, :married_filing_jointly), age, and (optionally) spouse's age.

RothIRA.calculate_limit(75000, :single, 25)
> 5500
RothIRA.calculate_limit(75000, :married_filing_jointly, 49)
> 11000
RothIRA.calculate_limit(75000, :married_filing_jointly, 49, 50)
> 12000

Version Note

roth_ira follows semantic versioning. New with version 1.0.0, year is no longer an optional parameter and must be specified. Additionally, implementation has shifted from module methods to class instance methods.