Direct material price variance
Pay 5.2 per unit against a standard price of 5 on 1,000 units and the purchase cost 200 more than budgeted, an unfavorable variance; 4.8 on 800 units saves 160. Enter the invoice price, the standard and the quantity bought. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Actual price
- 5.2
- Standard price
- 5
- Quantity purchased
- 1,000
- Price difference
- 0.2
- Variance
- 200
- Direction
- unfavorable
Direct material price variance is the purchasing-side standard-cost gap: it isolates how much extra, or how much less, you paid for the materials you bought compared with the standard unit price the budget assumed. The identity is the product of the price gap and the quantity purchased, so a twenty-cent overpay on one thousand units is a two-hundred currency-unit unfavorable variance, and a twenty-cent underpay on eight hundred units is a one-hundred-sixty favorable variance. Cost accountants, CMA and CPA candidates, and ERP close teams look up this calculator when they already have the invoice unit price, the standard unit price, and the purchased quantity and do not need a full three-way match. This direct material price variance calculator accepts those three figures, applies the textbook (actual price minus standard price) times quantity purchased identity, and returns the signed variance.
What direct material price variance is and how AP, SP, and quantity purchased form the gap
Direct material price variance, often abbreviated MPV or DMPV, is the purchasing half of the classic standard-cost material analysis. It answers a single question: given the quantity you actually bought, how much of the spending gap versus standard is explained only by the unit price you paid? The identity used in Horngren-style and Garrison-style managerial accounting is variance equals actual price minus standard price, times quantity purchased.
When the invoice unit price sits above the standard, the product is positive and the variance is unfavorable: the firm paid more than the budget assumed for those units. When the invoice unit price sits below the standard, the product is negative and the variance is favorable: purchasing beat the standard. When the two prices match, the variance is zero and the purchase is on standard.
Quantity purchased is the volume on the purchase, not the volume issued to production; that second volume belongs to the material quantity or usage variance, a different identity that this calculator does not compute. Labor rate variance and overhead spending variance are also different searches: they replace the material price with a wage rate or an overhead rate. Send the three numbers you already have.
The engine does not look up a price list, does not convert currencies, and does not split the variance into mix and yield. Zero purchased quantity is allowed and yields a variance of zero, which is the honest result when nothing was bought. A negative purchased quantity is rejected because a purchased volume cannot fall below zero.
Numeric outputs use half-up rounding so goldens compare byte-for-byte across runtimes.
Where a direct material price variance calculator earns its keep
Managerial-accounting courses use a direct material price variance calculator so students can turn any invoice unit price, standard unit price, and purchased quantity into the textbook MPV without mixing it with the quantity-variance term or flipping the favorable and unfavorable signs. Exam generators and LMS plugins need a deterministic oracle that rejects a negative purchased quantity instead of inventing not-a-number that a buggy grader might treat as success. Failed validation does not consume balance.
Keep requests small, pin the rounded variance field in tests, and you get reproducible purchasing-side numbers for homework, CMA drills, and edge workers without standing up a full standard-cost engine of your own. Use this capability when you already have actual price, standard price, and quantity purchased; if you only have quantity used and standard quantity allowed and want the usage variance, that is a different identity and does not belong in this price definition.
What you can do with it
Classroom standard-cost checks
Let students enter the invoice unit price, the standard unit price, and the quantity purchased and verify the signed MPV against textbook worked examples.
LMS and CMA exam auto-grading
Mark direct-material-price-variance items with a deterministic oracle that rejects a negative purchased quantity and never swaps favorable with unfavorable.
Purchasing and period-end notebooks
Batch-convert vendor invoice prices against a frozen standard into a comparable price-variance column without spreadsheet formula drift.
FAQ
How is direct material price variance calculated from actual price, standard price, and quantity purchased?
An actual price of 5.2, a standard of 5, and a purchased quantity of 1000 yield a variance of 200 (unfavorable).
Is a positive variance favorable or unfavorable?
Positive is unfavorable under the Horngren and Garrison convention this calculator uses: you paid more than the standard. Negative is favorable. Zero is on standard.
What happens if quantity purchased is negative?
A purchased volume cannot be below zero. Missing values, empty strings, infinities, and NaN are also rejected and are not billed.
Is this the same as material quantity variance or labor rate variance?
No. Quantity or usage variance uses quantity used versus standard quantity allowed times standard price. Labor rate variance uses wage rates and hours.
Should I enter the quantity bought or the quantity used in production?
The quantity bought, as it appears on the purchase. The quantity issued to production belongs to the material quantity or usage variance, a different calculation that this tool does not perform.
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/direct-material-price-variance \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"actual_price":5.2,"standard_price":5,"quantity_purchased":1000}'const res = await fetch("https://api.kit.forhosting.com/fin/direct-material-price-variance", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"actual_price": 5.2,
"standard_price": 5,
"quantity_purchased": 1000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/direct-material-price-variance",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"actual_price": 5.2,
"standard_price": 5,
"quantity_purchased": 1000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/direct-material-price-variance", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"actual_price":5.2,"standard_price":5,"quantity_purchased":1000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"actual_price":5.2,"standard_price":5,"quantity_purchased":1000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/direct-material-price-variance", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"actual_price": 5.2,
"standard_price": 5,
"quantity_purchased": 1000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.direct_material_price_variance",
"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
A negative purchased quantity is rejected with invalid_input instead of a hollow not-a-number.
Input contract, response shape, and error behaviour
Example: an actual price of 5.2, a standard of 5, and a purchased quantity of 1000 returns a price difference of 0.2 and a variance of 200, labeled unfavorable. An actual price of 4.8, a standard of 5, and a purchased quantity of 800 returns a variance of negative 160, labeled favorable. Negative unit prices are rejected the same way. Failed validation does not consume balance, which keeps exploratory scripts cheap when developers intentionally send a negative purchased quantity to confirm the error path. POST a JSON body with three required finite non-negative numbers. actual_price (aliases ap, actual, actual_unit_price, and purchase_price) is the invoice unit price of the material, in the same currency as the variance you want back. standard_price (aliases sp, standard, standard_unit_price, and budgeted_price) is the standard or budgeted unit price in that same currency. quantity_purchased (aliases aq, quantity, qty, qty_purchased, actual_quantity, and units_purchased) is the purchased volume in the physical units of the standard. Optional decimals is an integer from zero through twelve, default six, controlling half-up rounding on price_difference and variance. On success the body echoes the three inputs, then price_difference as actual minus standard, variance as that gap times quantity purchased, direction as unfavorable, favorable, or on_standard, a formula string restating the identity, and a short interpretation. Missing fields, empty strings, booleans, non-numeric strings, NaN, and infinities fail with invalid_input naming the field and are not billed. A negative quantity_purchased fails with invalid_input because purchased quantity cannot be below zero. Prefer plain JSON numbers over strings with currency symbols or thousand separators; numeric strings are accepted only when they match a strict finite number pattern without commas or labels. This calculator does not compute material usage variance, labor rate variance, or a three-way match against receipts. Pricing is a fixed $0.002 per successful call with unit item.
Where a direct material price variance calculator earns its keep
Period-end close workbooks and purchasing scorecards often tabulate vendor invoices against a frozen standard; pinning the arithmetic in a tiny parse API keeps spreadsheet drift out of the comparison column when someone later changes only the actual price.
Technical questions
What does the direct material price variance calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.