Cell phone plan calculator
A plan with a 40 base fee, a 10 per-gigabyte rate and 5 GB used costs 90 a month: 40 for access plus 50 for data. Enter your own three numbers to compare carriers, check a bill or solve a word problem. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base fee
- 40
- Per gb
- 10
- Gb used
- 5
- Data cost
- 50
- Total cost
- 90
A monthly cell phone plan is almost always two numbers glued together: a base fee that you pay even if you send no data, and a per-gigabyte rate that multiplies the gigabytes you actually used. This cell phone plan calculator takes those three figures, multiplies usage by the rate, adds the base fee, and returns the total monthly cost so you can compare carriers, check a bill, or grade an algebra word problem without a spreadsheet. Enter the monthly base fee, the price per gigabyte, and the gigabytes used; receive the data charge and the total. Zero usage is allowed and then the total equals the base fee.
How base fee, per-gigabyte rate, and usage become a monthly total
The base fee is the access charge printed on the first line of the bill — the amount due even if the handset stayed in airplane mode all month. The per-gigabyte rate is the overage or pay-as-you-go price of one gigabyte of data, typed the way carriers print it, so ten means ten currency units per gigabyte, not ten percent. Gigabytes used is the usage the carrier counted for the cycle, including hotspot tethering if your plan bills that pool at the same rate.
Multiplying the rate by usage gives the data charge; adding the base fee gives the monthly total this calculator returns. A plan with a forty base fee, a ten per-gigabyte rate, and five gigabytes used costs ninety: forty plus fifty of data. Zero usage is a legitimate month and then the total equals the base fee rather than an error, because a line that sat unused is still billed the access charge.
Fractional gigabytes are allowed: two and a half gigabytes at four per gigabyte is ten of data. You supply the three numbers; the calculator multiplies and adds them and rounds money half-up to two decimal places so goldens compare byte-for-byte across runtimes. A promotional month with a waived access charge is allowed as a zero base fee, and then the total equals the data charge alone.
FAQ
What happens if gigabytes used is negative?
Gigabytes used cannot be negative in this contract and is not billed. Zero usage is valid and yields a total equal to the base fee.
Does this include taxes, roaming, or a family plan?
No. The calculator prices one line: access fee plus metered data.
What do I pay if I used no data this month?
Just the base fee. A line that sat unused is still billed its access charge, so zero gigabytes is a normal month and the total equals the base fee rather than an error.
Should hotspot data be included in the gigabytes used?
Yes, if your plan bills tethering from the same data pool at the same rate. Enter the usage the carrier counted for the whole billing cycle, hotspot included.
How do I enter an unlimited plan or a month with the base fee waived?
For unlimited data that is really a zero per-gigabyte rate, enter zero as the rate and the total equals the base fee. For a promotional month with no access charge, enter zero as the base fee and only the data charge remains.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/cell-phone-plan \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base_fee":40,"per_gb":10,"gb_used":5}'const res = await fetch("https://api.kit.forhosting.com/fin/cell-phone-plan", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_fee": 40,
"per_gb": 10,
"gb_used": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/cell-phone-plan",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base_fee": 40,
"per_gb": 10,
"gb_used": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/cell-phone-plan", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base_fee":40,"per_gb":10,"gb_used":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base_fee":40,"per_gb":10,"gb_used":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/cell-phone-plan", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base_fee": 40,
"per_gb": 10,
"gb_used": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.cell_phone_plan",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Gigabytes used cannot be negative: that case fails with invalid_input and is not billed.
How base fee, per-gigabyte rate, and usage become a monthly total
Most consumer wireless plans still bill a monthly identity you can write on one line: total_cost equals base_fee plus per_gb times gb_used. This endpoint does not look up carrier catalogs, does not convert currencies, does not split a family plan across lines, and does not model taxes, regulatory fees, device installments, or unlimited buckets that stop metering after a fair-use cap. Unlimited marketing that is actually a zero per-gigabyte rate is allowed and then data_cost is zero and the total equals the base fee.
Input contract, response shape, and error behaviour
POST a JSON body with three required finite numbers. base_fee is the monthly access charge in one currency unit; aliases base, monthly_fee, monthly_base, plan_fee, and fee map to the same field so a bill export can keep its column names. per_gb is the price of one gigabyte in that same currency; aliases rate, per_gigabyte, gb_rate, rate_per_gb, and per_gb_rate are accepted. gb_used is the gigabytes counted in the cycle; aliases gigabytes, gigabytes_used, data_gb, usage_gb, and gb are accepted. Each numeric field may arrive as a JSON number or a numeric string. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. Zero usage is valid and returns total_cost equal to the base fee. On success the body echoes base_fee and per_gb rounded to two decimal places and gb_used, then reports data_cost as the usage term rounded to two decimal places, total_cost as the monthly sum, and a formula string restating the identity. Example: forty of base fee, ten per gigabyte, and five gigabytes yields data_cost of fifty and total_cost of ninety. Pair the JSON with your own rule for taxes, roaming, and family-line splits, because this endpoint prices one line against one rate; it does not assign a carrier, apply a fair-use cap, or convert currencies. Keep requests small, pin the rounded total_cost in tests, and you get a reproducible monthly figure for worksheets, LMS plugins, and edge workers without standing up a billing engine of your own.
Where a cell phone plan calculator earns its keep
Households comparing a forty-plus-ten overage plan against a seventy unlimited quote use a cell phone plan calculator to turn last month's gigabytes into one comparable dollar figure before they switch. A cell phone plan prices one access fee against one metered data rate and returns money. Failed validation does not consume balance. Taxes, device installments, roaming, and family-plan splits stay outside this identity on purpose: fold them in your own layer after you have the raw plan dollars. Budgeters drop a planned base fee and the published per-gigabyte rate, then pin total_cost so the rest of the month's envelope already reflects the wireless line. Teachers and exam-prep generators need a deterministic oracle for the classic word problem — a cell phone plan costs a dollars plus b per gigabyte; if you use g gigabytes, what is the monthly cost — that marks negative usage as invalid_input instead of silently returning a negative bill a buggy grader might treat as success. Product teams wire the same contract into offer pages and onboarding quizzes that must show total_cost for a sample usage without calling a carrier API. This is a different search and a different job from an annual subscription roll-up, from a cash-back reward, and from a phone-carrier lookup: those tools normalize billing cycles across a list of services, multiply spend by a reward percent, or resolve a number to a network. Keep gigabytes used non-negative, pin the rounded total_cost in tests, and you get a reproducible monthly amount for teasers, bill checks, and edge workers without standing up a wireless ledger of your own.
Integration use cases
Compare metered plans against last month's usage
Turn last cycle's gigabytes and each carrier's published base fee and per-gigabyte rate into total_cost so a cheap overage plan and a higher unlimited quote sit on the same dollar scale.
Check a wireless bill against the advertised rate
Drop the access charge, the per-gigabyte rate, and the gigabytes on the statement, then confirm total_cost matches the line you expect before you dispute a data overage.
Grade the classic cell-phone-plan word problem
Send base fee, rate, and usage from an algebra item and pin total_cost, or reject negative gigabytes used as invalid_input instead of inventing a negative bill.
Technical questions
How is the monthly cell phone plan cost calculated?
Send finite numbers base_fee (non-negative access charge), per_gb (non-negative price per gigabyte), and gb_used (non-negative gigabytes). The API returns total_cost = base_fee + per_gb × gb_used, rounded to two decimal places, plus data_cost for the usage term alone.
Can the base fee or the per-gigabyte rate be zero?
Yes. A waived access charge (base_fee of zero) returns a total equal to the data charge. A zero per-gigabyte rate (unlimited-style metering) returns data_cost of zero and a total equal to the base fee. Negative fee or rate is rejected.
What does the cell phone plan calculator cost?
The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.