ForHosting KIT · Science

Fertilizer blend ratio calculator

A 1,000 kg load of 10-10-10 needs 100 kg each of nitrogen, phosphate and potash, and this calculator works out how much urea, DAP, potash and filler deliver it. Enter each source's bag numbers, the target grade and the load size. 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
Target n
10
Target p
10
Target k
10
Total mass
1,000
You get
Material count
3
Target grade
10-10-10
Target ratio
1:1:1
Filler mass
483.6168872086

A fertilizer bag prints three numbers — nitrogen, phosphate as P2O5, and potash as K2O — but a field recommendation is almost never a single off-the-shelf grade. Co-op blenders, custom applicators, agronomists, and farm software need the masses of two or more source materials that combine into a target NPK grade for a known hopper load. This fertilizer blend ratio calculator accepts each source guaranteed analysis, the N-P-K percentages you want in the finished mix, and the total mass to produce. It solves the nutrient-and-mass balance, optionally with an inert filler, and returns the recipe plus the actual grade so a blend sheet and a scale ticket agree.

How a target NPK blend is turned into source masses

Every dry fertilizer source is sold on a guaranteed analysis: the three bag numbers are percent nitrogen (N), percent phosphate expressed as P2O5 (P), and percent potash expressed as K2O (K) by mass. A blend that should read 10-10-10 on the finished ticket must therefore deliver one tenth of its mass as each of those three nutrient expressions. If the load is one thousand kilograms, that is one hundred kilograms of N, one hundred of P2O5, and one hundred of K2O.

Each source contributes its own grade times its own mass. Urea at 46-0-0 contributes only nitrogen; diammonium phosphate at 18-46-0 contributes both nitrogen and phosphate; muriate of potash at 0-0-60 contributes only potash. When those three sources are combined with an inert filler (sand, limestone, or another carrier that adds no NPK), the balances become four linear equations in four unknowns: nitrogen close, phosphate close, potash close, and the masses plus filler equal the ordered total.

If a nutrient row is identically zero on every source and the target for that nutrient is also zero, the row is dropped as a 0=0 identity so a two-source mix such as urea plus DAP can still make a 20-20-0 grade with filler.

When there are more unknowns than independent balances, the calculator falls back to the classic sequential assignment used on blend plants: dose phosphate from the unused source with the highest P grade, dose potash from the unused source with the highest K grade, supply leftover nitrogen from the remaining highest-N source, and let filler take the rest. Negative masses mean the target sits outside the convex hull of the sources and the task is rejected rather than quietly clipping a hopper to zero.

Who uses a fertilizer blend calculator

Custom blend plants print a work order for every hopper: kilograms of urea, DAP, MOP, and limestone that must sit on the belt before the mixer starts. Farm-management and agronomy apps need the same arithmetic so a recommendation written as a target grade becomes a purchasable recipe instead of a single bag that does not exist in the shed. Vocational agriculture courses can auto-grade blend-sheet homework without standing up a linear-algebra library.

Co-ops that already stock three or four commodities can test whether a grower-requested 12-24-12 is feasible before promising a delivery. Failed validation does not consume balance. Always read n, p, and k from the current guaranteed analysis on the bag or mill sheet — a mapped 11-52-0 MAP is not an 18-46-0 DAP — and treat filler as a documented carrier, not a hidden fudge factor.

This calculator formulates a mix; it does not replace a soil test, a legal label, or a licensed agronomist’s rate for a named crop.

Custom dry-blend work orders

Turn a 10-10-10 or 12-24-12 ticket into kilograms of urea, DAP, MOP, and filler for a known hopper mass before the mixer starts.

Farm software and recommendation apps

Convert a field NPK grade into a purchasable source recipe so the shed list matches the written recommendation.

Teaching and auto-graded blend sheets

Score fertilizer-formulation homework with a deterministic oracle that rejects infeasible grades instead of inventing negative hopper weights.

Are p and k elemental phosphorus and potassium?

No. Like the three numbers on a fertilizer bag, p is percent P2O5 and k is percent K2O. Nitrogen n is elemental N. Use the guaranteed analysis printed on each source.

Why did the calculator reject my target grade?

A target is rejected when a needed nutrient has no source, when the linear system is singular, or when a source would need a negative mass. Add a complementary material, enable filler, or change the grade.

How much of each nutrient does a 10-10-10 blend contain?

One tenth of the mass for each nutrient. In a 1,000 kg load that is 100 kg of nitrogen, 100 kg of phosphate as P2O5 and 100 kg of potash as K2O, whichever sources supply them.

Why add an inert filler to a fertilizer blend?

When the sources together are richer than the target grade, a filler such as sand or limestone makes up the rest of the load. It adds no nutrients, so the finished mix reads the grade that was ordered.

Can I make a blend from only two fertilizer sources?

Yes, when the target leaves one nutrient at zero. Urea plus DAP with filler can make a 20-20-0 grade, because the potash balance drops out when neither the sources nor the target contain potash.

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/bio/fertilizer-blend-ratio

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/bio/fertilizer-blend-ratio \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"materials":[{"name":"urea","n":46,"p":0,"k":0},{"name":"DAP","n":18,"p":46,"k":0},{"name":"MOP","n":0,"p":0,"k":60}],"target_n":10,"target_p":10,"target_k":10,"total_mass":1000}'
{
  "materials": [
    {
      "name": "urea",
      "n": 46,
      "p": 0,
      "k": 0
    },
    {
      "name": "DAP",
      "n": 18,
      "p": 46,
      "k": 0
    },
    {
      "name": "MOP",
      "n": 0,
      "p": 0,
      "k": 60
    }
  ],
  "target_n": 10,
  "target_p": 10,
  "target_k": 10,
  "total_mass": 1000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "bio.fertilizer_blend_ratio",
  "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.

Too few sources, impossible grades, or a target that those materials cannot hit fail with invalid_input instead of inventing a mix.

How a target NPK blend is turned into source masses

This endpoint solves that square system with Gaussian elimination and partial pivoting.

Input contract, response shape, and error behaviour

Each object must include n, p, and k as finite percents from zero through one hundred (the bag numbers). The three percents on one source may not sum above one hundred, and at least one of them must be greater than zero — inert carrier is not a source row, it is the filler the solver may add. POST a JSON body with materials as a required array of two to six source objects. The optional name labels the row; if you omit it the engine names the row material_1 and so on. Required scalars target_n, target_p, and target_k are the finished-blend grade percents; at least one must be positive and their sum may not exceed one hundred. Required total_mass is the finished load in any consistent mass unit; every mass in the response uses that same unit. Optional allow_filler defaults to true so a 10-10-10 from urea, DAP, and MOP can be padded to the ordered tonnage; set it false when the three sources must occupy the entire load with no carrier. Optional field_area, when present and positive, adds rate_per_area on the whole blend and on each component so a two-hectare field and a one-thousand-kilogram load become five hundred units of blend per unit area. Aliases are accepted: sources, fertilizers, ingredients, or blend for the array; nitrogen or n_target for target_n; phosphorus or p2o5 for target_p; potassium or k2o for target_k; mass or blend_mass for total_mass; filler or use_filler for allow_filler; area, hectares, or acres for field_area. Missing arrays, a single source, percents outside zero to one hundred, a zero total_mass, a target no source can supply, a singular set of grades, or a negative solved mass fail with invalid_input naming the field. Those failures are not billed. On success the body echoes the cleaned targets and total, lists components with mass, percent of the load, and nutrient masses contributed by each source, reports filler_mass and filler_percent, and states actual_n, actual_p, actual_k, actual_grade, and the simplified target_ratio (10-10-10 becomes 1:1:1). formula and method record whether the square linear blend or the sequential source assignment was used.

Where a fertilizer blend ratio API earns its keep

Keep requests small, pin component masses and actual_grade in tests, and you get reproducible blend sheets for work orders, LMS plugins, and edge workers without hosting custom formulation infrastructure of your own.

How do I calculate fertilizer blend masses for a target NPK grade?

Send two or more sources with bag percents n, p, and k, the finished-blend target_n, target_p, and target_k, and total_mass. The API returns each source mass, optional filler, and the actual grade of the mix.

When is filler added to the blend?

When allow_filler is true (the default) and the nutrient sources weigh less than total_mass, the remainder is inert filler. Set allow_filler to false if the sources must fill the entire load.

What does the fertilizer blend ratio 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 →