---
title: "College major ROI by median salary"
method: GET
path: "/api/v1/calculate/college-major-roi"
---

# College major ROI by median salary

`GET /api/v1/calculate/college-major-roi`

## Request

- Base URL: `https://everycalc.xyz`
- URL: `https://everycalc.xyz/api/v1/calculate/college-major-roi`
- Auth: none declared

Payback years, lifetime earnings minus degree cost, and salary to cost ratio for a major, using the page table of approximate median early career salaries by major. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.

## Query parameters

- `major` 'Computer Science' | 'Data Science' | 'Electrical Engineering' | 'Mechanical Engineering' | 'Mathematics' | 'Economics' | 'Physics' | 'Information Technology' | 'Civil Engineering' | 'Finance' | 'Nursing' | 'Chemistry' | 'Accounting' | 'Architecture' | 'Business Administration' | 'Marketing' | 'Biology' | 'Communications' | 'English' | 'History' | 'Psychology' | 'Education (Teaching)'
- `degree_cost` number, required
- `career_years` number

## Response `200`

Calculation result.

## Other responses

- `400`: Invalid input.

---

[API](https://skmtc.dev/everycalc/apis/everycalc-api.md) · [All operations](https://skmtc.dev/everycalc/apis/everycalc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/everycalc/apis/everycalc-api/revisions/a4bd5db0868a?raw)
