---
title: Calculate Roth IRA tax contribution limit
slug: calculate-roth-ira-tax-contribution-limit
docTags: 
createdAt: 2023-11-11T16:06:16.034Z
---

{
  "id": "NOXrNWjbak0RAOVNeCfrE",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://osifinance.com/api/v1/roth-ira-contribution-limit",
    "servers": [
      {
        "url": "https://osifinance.com/api/v1/roth-ira-contribution-limit"
      }
    ],
    "name": "Calculate Roth IRA tax contribution limit",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Parameters for calculating Roth IRA tax contribution limit",
          "schema": [
            {
              "name": "api_key",
              "kind": "required",
              "type": "string",
              "description": "API key needed to authorize requests",
              "modelRef": "#/components/schemas/ApiKey",
              "customType": "ApiKey",
              "schema": []
            },
            {
              "name": "sources",
              "kind": "optional",
              "type": "boolean",
              "description": "Whether to include sources for the specific endpoint",
              "default": false,
              "modelRef": "#/components/schemas/Sources",
              "customType": "Sources",
              "schema": []
            },
            {
              "name": "filing_status",
              "kind": "optional",
              "type": "string",
              "description": "Filing status for taxes.",
              "default": "single",
              "modelRef": "#/components/schemas/FilingStatus",
              "customType": "FilingStatus",
              "schema": []
            },
            {
              "name": "federal_agi",
              "kind": "optional",
              "type": "integer",
              "description": "Federal adjusted gross income (agi).",
              "default": 75000,
              "modelRef": "#/components/schemas/FederalAgi",
              "customType": "FederalAgi",
              "schema": []
            },
            {
              "name": "filer_over_50",
              "kind": "optional",
              "type": "boolean",
              "description": "Whether the filer is over the age of 50.",
              "default": false,
              "modelRef": "#/components/schemas/FilerOver50",
              "customType": "FilerOver50",
              "schema": []
            },
            {
              "name": "birth_year",
              "kind": "optional",
              "type": "integer",
              "description": "Year of birth.",
              "default": 1990,
              "modelRef": "#/components/schemas/BirthYear",
              "customType": "BirthYear",
              "schema": []
            },
            {
              "name": "traditional_ira_contributions",
              "kind": "optional",
              "type": "integer",
              "description": "Traditional IRA contributions.",
              "default": 0,
              "modelRef": "#/components/schemas/TraditionalIraContributions",
              "customType": "TraditionalIraContributions",
              "schema": []
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<success>",
                "description": "Success message",
                "example": ""
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "Contribution Limit",
                    "kind": "optional",
                    "type": "number<double>",
                    "description": "Roth IRA contribution limit",
                    "example": ""
                  },
                  {
                    "name": "Unrestricted Limit",
                    "kind": "optional",
                    "type": "integer<integer>",
                    "description": "Unrestricted, maximum Roth IRA contribution limit",
                    "example": 0
                  },
                  {
                    "name": "Percent Contributable",
                    "kind": "optional",
                    "type": "number<double>",
                    "description": "Percentage contributable of unrestricted, maximum Roth IRA contribution limit",
                    "example": ""
                  }
                ]
              },
              {
                "name": "sources",
                "kind": "optional",
                "type": "object",
                "description": "Sources type and text for relevant articles and IRS publications",
                "example": "",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "string<No API key provided. Please provide an API Key. | Invalid API key provided. Please register at https://osifinance.com/signup to get a valid API key.>",
                "description": "Error message",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "429",
        "description": "Too Many Requests",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "string<Usage Limit Reached. You have reached the maximum number of daily requests for your account. You can get a higher limit by upgrading to a paid plan or through our give2get program. Learn more at https://osifinance.com/resources/help/give2get?question=How%20can%20I%20get%20free,%20unlimited%20access%20to%20the%20API%20and%20calculators?.>",
                "description": "Error message",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "emdwQ8i4c43yoKkTgxgST",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://osifinance.com/api/v1/roth-ira-contribution-limit \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"api_key\": \"\",\n     \"filing_status\": \"single\",\n     \"federal_agi\": 75000,\n     \"birth_year\": 1990\n     }'"
        },
        {
          "id": "QjNTvCjdPM0R6lJ0NRB7Z",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"api_key\": \"\",\n   \"filing_status\": \"single\",\n   \"federal_agi\": 75000,\n   \"birth_year\": 1990\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://osifinance.com/api/v1/roth-ira-contribution-limit\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ssdchzSQzq0WaOxL3Qq8U",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://osifinance.com/api/v1/roth-ira-contribution-limit\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"api_key\": \"\",\n   \"filing_status\": \"single\",\n   \"federal_agi\": 75000,\n   \"birth_year\": 1990\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "L0VqX2qH_bqgiXyPzg7mE",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://osifinance.com/api/v1/roth-ira-contribution-limit\"\n\npayload = json.dumps({\n   \"api_key\": \"\",\n   \"filing_status\": \"single\",\n   \"federal_agi\": 75000,\n   \"birth_year\": 1990\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "emdwQ8i4c43yoKkTgxgST"
    },
    "results": {
      "languages": [
        {
          "id": "6h4hXrICCA2rfShA-Au0L",
          "language": "200",
          "code": "// OK\n{\n  \"status\": \"\",\n  \"data\": {\n    \"Contribution Limit\": \"\",\n    \"Unrestricted Limit\": \"\",\n    \"Percent Contributable\": \"\"\n  },\n  \"sources\": {}\n}"
        },
        {
          "id": "aUmez3iv-XjsoGJ1xNLmJ",
          "language": "400",
          "code": "// Bad request\n{\n  \"error\": \"\"\n}"
        },
        {
          "id": "P6Gh0YmtP6USnNvIujrw6",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"error\": \"\"\n}"
        },
        {
          "id": "EmoTu_iC8kpTUQQYOWGTq",
          "language": "404",
          "code": "// Not found\n{\n  \"error\": \"\"\n}"
        },
        {
          "id": "cI9U-WlqGi6rCKkooLGVT",
          "language": "429",
          "code": "// Too Many Requests\n{\n  \"error\": \"\"\n}"
        },
        {
          "id": "ML8fqIrbY55KbVq1JKQQv",
          "language": "500",
          "code": "// Internal server error\n{\n  \"error\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "6h4hXrICCA2rfShA-Au0L"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}