Dirham (mass) converter
One classic dirham weighs 2.975 grams. Convert this historical Islamic unit of mass, not the modern currency, into grams, grains and mithqals, choosing the classic or the heavier standard and the number of decimals. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Dirham
- 1
- Decimal places
- 4
- Variant
- classic_2_975g
- G
- 2.975
- Grain
- 45.9113
- Mithqal
- 0.7
Convert historical Islamic dirham mass (not modern currency) to grams and grains. Search intent: dirham weight to grams. No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not
A historical weight, not a currency
The dirham on this page is a unit of mass from Islamic history, not the money of any modern country, so no exchange rate is involved. By default a dirham is taken as 2.975 grams, the classic value; a heavier option sets it at 3.125 grams for sources that follow that standard. The other units come from the grams: one grain is 0.06479891 grams, so a classic dirham comes to about 45.9113 grains and to seven tenths of a mithqal. You can start from dirhams, grams, grains or mithqals and read the same mass in all of them.
Getting a figure you can rely on
The most common mistake is mixing the two standards: a figure taken from a source that uses the heavier dirham will look wrong if you convert it with the classic value, so check which one your text assumes before you compare results. The second is reading the word dirham as money and reaching for a currency converter. The third is rounding too early. Here the full-precision result is rounded only once, half up, to the number of decimals you choose, which avoids the small drifts that come from rounding intermediate steps.
When to use it
Use when the search intent matches this tool. Convert historical Islamic dirham mass (not modern currency) to grams and grains. No network calls, no random seeds, and no server state are required for a correct answer.
Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types.
When a field is optional, defaults are documented in params and echoed in the output. This
FAQ
Locales?
EN-only delivery; Nitro hydrates the other seven languages.
Which dirham standard should I choose?
Use the classic value of 2.975 grams unless your source follows the heavier standard, in which case pick the 3.125 gram option. Mixing the two is the most common reason a converted figure looks wrong.
How many grains are in a dirham?
About 45.9113 grains for a classic dirham. The converter uses a grain of exactly 0.06479891 grams, so the figure follows directly from the 2.975 gram dirham.
Is this the dirham currency used today?
No. This is the historical Islamic unit of mass, not modern money, so the result is a weight in grams, grains or mithqals and never an exchange rate.
How does a dirham compare with a mithqal?
A classic dirham equals seven tenths of a mithqal, which is why the example of one dirham shows 0.7 mithqal next to 2.975 grams and 45.9113 grains.
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/conv/dirham-mass \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"g":2.975}'const res = await fetch("https://api.kit.forhosting.com/conv/dirham-mass", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"g": 2.975
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/dirham-mass",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"g": 2.975
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/dirham-mass", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"g":2.975}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"g":2.975}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/dirham-mass", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"g": 2.975
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.dirham_mass",
"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
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
How it works
No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types. When a field is optional, defaults are documented in params and echoed in the output. Convert historical Islamic dirham mass (not modern currency) to grams and grains. classic 2.975 g/dirham; heavy 3.125 g option; grain = 0.06479891 g. The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Inputs, limits and rounding
Outputs echo inputs for logging. No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types. When a field is optional, defaults are documented in params and echoed in the output. Provide required JSON fields. Optional decimals use half-up once from raw IEEE values. Invalid types or ranges raise invalid_input. The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
When to use it
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Integration use cases
Quick check
Use the free widget to verify a formula before production.
Automation
Call the API with the same JSON contract from scripts or CMS.
Teaching
Show pinned golden examples without proprietary software.
Technical questions
Is the browser widget free?
Yes. Tier A is free client-side with the same core as the API.
Does it use the network?
No. Computation is local and deterministic.
What on bad input?
invalid_input is thrown; failed jobs are not billed.
API compatible?
Yes — same JSON fields as params.json.