ForHosting KIT · Health & fitness

Keto carb limit calculator

On 2000 kcal a day, a keto plan allows at most 25 g of net carbs. Enter your daily calories and get the gram ceiling before you write a shopping list or log a meal. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Daily calories
2,000
You get
Carbohydrates (%)
5 g/day
Threshold g
50
Carb kcal
100
Percent based net carbs g
25

A ketogenic diet keeps daily net carbohydrates low enough that the body relies primarily on fat oxidation and ketone production rather than dietary glucose. Coaches, meal-planning apps, and self-trackers need a clear gram ceiling before they build shopping lists or log meals, not a vague “eat fewer carbs” slogan. This keto carb limit calculator turns a daily calorie target into a maximum net carbohydrate budget by taking the smaller of two classic constraints: a percent-of-energy carb share (default five percent of kilocalories converted at four kilocalories per gram) and an absolute gram threshold commonly used for ketosis (default fifty grams, or twenty for stricter protocols). Missing or non-positive daily calories fail as invalid input and are not billed.

Using it with clients, and its practical limits

Call the free in-browser keto carb limit calculator for quick checks, client education, lecture demos, and meal-prep planning without installing a spreadsheet. Prefer calorie intakes that already match your product’s maintenance or deficit estimate—if you only know macros from another calculator, feed the same daily energy target here so percent-based carbs stay consistent across tools. Keep expectations educational: this is a planning and literacy tool, not a diagnostic medical device, and users with atypical needs should follow clinical ketogenic protocols rather than any single formula alone.

Combine with protein and fat planning on your side if you need a full macro split; this capability intentionally focuses on the net-carb ceiling that defines the ketogenic threshold.

Coaching and meal planning

Coaches enter a client’s daily calories and optional strict or liberal gram thresholds to show a clear net-carb ceiling before weekly meal plans are built.

Does this count fiber from my meals?

No. It returns a planning budget for net carbs.

How is the daily net carb limit worked out?

It takes the smaller of two limits. One is a share of your calories, 5% by default, turned into grams at 4 kcal per gram of carbohydrate. The other is a fixed cap, 50 g by default.

Why is my limit 25 g and not 50 g on 2000 calories?

Because 5% of 2000 kcal is 100 kcal, which is 25 g of carbohydrate. That is lower than the 50 g cap, so the percentage sets your limit, and the result says so.

Should I use a cap of 20, 30 or 50 grams?

50 g is a common liberal ketogenic cap and the default, 30 g a moderate one, and 20 g models a stricter, therapeutic-style ceiling. If you follow a clinical protocol, use the cap it gives you.

Does the calculator also give me protein and fat targets?

No. It only sets the net-carb ceiling that defines the ketogenic threshold. Plan protein and fat separately, and use the same daily calorie figure in both tools so the numbers stay consistent.

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.

POSThttps://api.kit.forhosting.com/health/keto-carb-limit

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.

curl -X POST https://api.kit.forhosting.com/health/keto-carb-limit \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"daily_calories":2000}'
{
  "daily_calories": 2000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "health.keto_carb_limit",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The path is pure deterministic arithmetic with no network calls and no random seed, so browser widgets and prepaid API clients return identical JSON every time. The free browser tool matches the paid automation contract at $0.002 per successful API item.

What the keto carb limit measures and which inputs you need

Maximum daily net carbohydrates are the upper gram budget of digestible carbohydrate that a ketogenic-style plan still treats as compatible with staying under a chosen threshold. Instead it answers the planning question first: how many net carbohydrate grams per day should you allow before meals are even logged. Nutrition labels often list total carbohydrate and fiber; net carbs in everyday planning language mean total carbohydrate minus fiber (and sometimes sugar alcohols), but this endpoint does not parse a food diary. Send daily_calories as a positive finite number in kilocalories per day; aliases calories, kcal, energy_kcal, and calorie_intake are accepted. Optionally send carb_percent as the maximum share of energy from net carbs, typically near five percent on strict keto macros, with aliases carbs_percent, carb_pct, and percent_carbs; when omitted the engine uses five. Optionally send threshold_g as an absolute ceiling in grams per day, with aliases max_carbs_g, net_carb_cap, absolute_cap_g, and carb_cap_g; when omitted the engine uses fifty grams, a common liberal ketogenic cap, while twenty grams models a stricter therapeutic-style ceiling. The engine multiplies daily calories by carb percent over one hundred to obtain carb kilocalories, divides by four to obtain percent-based net carb grams, then returns the minimum of that value and threshold_g as max_net_carbs_g. If daily calories are missing, zero, or negative the request fails with invalid_input. Identical inputs always yield identical JSON because the algorithm never touches the network, a model, a clock, or a random generator.

Reading the response fields and common pitfalls

Do not treat the result as a medical prescription: people with diabetes, epilepsy protocols, pregnancy, or other clinical constraints need professional guidance. Extremely large calorie or threshold inputs above the published isolate safety caps are rejected. On success the response echoes daily_calories, carb_percent, and threshold_g so clients can confirm the bounds that were applied. The headline number is max_net_carbs_g in grams per day, which is always the lesser of the percent-based path and the absolute threshold. The field percent_based_net_carbs_g shows the calorie-percent path alone so dashboards can explain why a high-calorie day might still be limited by the threshold, or why a low-calorie day hits the percent bound first. carb_kcal is the energy allotted to net carbs from the percent path before dividing by four kilocalories per gram. limiting_factor is either percent or threshold depending on which bound produced the final maximum, which is useful for coaching copy that says “your calorie budget already keeps you under fifty grams” versus “your absolute keto ceiling is the binding constraint.” unit is always g/day, kcal_per_gram_carb is always four, formula restates the min equation, and method is always min_percent_and_threshold so downstream code can branch without sniffing shapes. Pair this ceiling with your own food logger that subtracts fiber to score net carbs against max_net_carbs_g on the client.

API usage, pricing, coaching workflows, and practical limits

Send a JSON body with required daily_calories (or an alias) and optional carb_percent and threshold_g. Use the prepaid API when a wellness SaaS, telehealth intake form, fitness coach dashboard, or calorie-tracking pipeline needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Authors shipping SDKs can map max_net_carbs_g and limiting_factor into dashboard cards and export CSV columns labeled percent path and absolute ceiling—the same numbers coaches write by hand when they apply five percent of calories and a twenty-to-fifty gram cap on paper.

Wellness and fitness apps

Apps that already store energy goals call a stable prepaid endpoint for max daily net carbs instead of reimplementing percent-and-threshold math in every client language.

Classroom and content demos

Courses compare five-percent macro budgets with twenty- versus fifty-gram absolute caps and pin expected JSON in automated tests with deterministic outputs.

How is the keto carb limit calculated?

The engine computes percent-based net carbs as daily_calories × carb_percent/100 ÷ 4 kcal/g, then returns the minimum of that value and threshold_g (defaults: 5% and 50 g).

What inputs are required?

Only daily_calories (positive kcal/day) is required. carb_percent defaults to 5 and threshold_g defaults to 50 when omitted. Missing or non-positive calories fail with invalid_input.

What is the difference between percent-based carbs and threshold_g?

Percent-based carbs scale with your calorie target; threshold_g is a hard gram ceiling often used for ketosis (for example 20 g strict or 50 g liberal). The API returns the smaller of the two.

What does the keto carb limit calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →