RAW photo file size calculator
This RAW photo file size calculator estimates how much space one uncompressed sensor capture needs when you know the camera resolution in megapixels and the bit depth stored for each pixel.
Run — free
It converts those two specifications into an approximate byte count, decimal megabytes, and binary mebibytes. The result is useful for storage planning, transfer estimates, and comparing camera workflows. It is a transparent mathematical estimate rather than a prediction of every proprietary RAW format, because actual files may use compression, metadata, padding, previews, or manufacturer-specific packing.
Enter the sensor resolution and stored bit depth
Start with the effective megapixel count used for the photograph, not necessarily the rounded marketing number printed on the camera body. A 24-megapixel input is interpreted as 24,000,000 sensor pixels. Then enter the number of uncompressed bits assigned to each pixel sample. Common camera values include 12, 14, and 16 bits, although the calculator accepts any finite positive value so it can cover unusual scientific and industrial sensors as well. The bit depth is not the same thing as the bits-per-channel label used for a finished RGB image. A typical Bayer-pattern camera sensor records one filtered sample at each photosite before demosaicing, so the simple estimate uses one sample per sensor pixel. Both fields are required. Megapixels must be greater than zero, since a zero or negative sensor resolution cannot represent a photograph, and bit depth must also be positive for the byte calculation to have physical meaning. Decimal values are accepted for cameras whose published effective resolution is, for example, 24.2 megapixels.
Understand the calculation and the reported units
The estimator multiplies megapixels by 1,000,000 to obtain the pixel count, multiplies that count by the selected bit depth, and divides by eight to convert bits into bytes. For example, each 16-bit sample consumes two uncompressed bytes, while a mathematically packed 12-bit sample consumes one and a half bytes on average. The output includes the estimated pixels and bytes so you can audit the calculation directly. It also gives decimal megabytes, where one MB equals 1,000,000 bytes, and binary mebibytes, where one MiB equals 1,048,576 bytes. Storage manufacturers and transfer-rate specifications often use decimal units, while operating systems and technical tools may display binary units, so the two values legitimately differ even though they describe the same byte total. Results are rounded only for stable, readable JSON output; the underlying formula does not add a compression factor, safety allowance, thumbnail size, or metadata estimate. This makes comparisons consistent across cameras and avoids disguising assumptions as measured facts.
Use the estimate for practical storage planning
Treat the result as a baseline for an uncompressed capture, then adapt it to the real workflow you are planning. Multiply the per-photo byte result by an expected frame count to estimate a shoot, burst, memory card, archive, or backup requirement. Allow additional room for filesystem overhead, catalog databases, sidecar files, previews, edits, and a sensible free-space margin. A camera's actual RAW files may be smaller when it uses lossless or lossy compression, or somewhat larger when samples are padded into 16-bit words, embedded previews are substantial, metadata is extensive, or extra pixels outside the nominal image area are retained. Multi-shot modes and some specialized sensors may store more than one sample per output pixel, which also falls outside this simple model. For the most accurate operational forecast, compare the estimate with several files produced by the exact camera, RAW mode, crop setting, and firmware version you will use. The calculator remains valuable as a format-independent reference and as a quick check when measured file sizes are unavailable.
What you can do with it
Choose memory card capacity
Estimate the uncompressed space per exposure before deciding how many cards a long event, wildlife session, or studio day may require.
Plan archive and backup storage
Turn camera specifications into a consistent baseline for sizing primary storage, local backups, and off-site copies.
Compare camera data loads
Compare the approximate capture payload of sensors with different resolutions and bit depths without relying on proprietary compression behavior.
FAQ
What does the calculator cost?
The API price is $0.002 per request. The browser calculator can run the same deterministic calculation without uploading a photograph.
Why is my actual RAW file smaller than the estimate?
Many cameras apply lossless or lossy RAW compression. The calculator intentionally estimates an uncompressed baseline and does not guess a camera-specific compression ratio.
Why might an actual RAW file be larger?
Metadata, embedded JPEG previews, row padding, masked sensor pixels, and storing samples in wider words can add bytes beyond the tightly packed estimate.
Does a 14-bit RAW always pack every sample into exactly 14 bits?
No. Some formats pack samples tightly, while others pad them into wider storage units. This estimate assumes tight packing at the stated bit depth.
What is the difference between MB and MiB?
One decimal MB is 1,000,000 bytes. One binary MiB is 1,048,576 bytes, so the numerical values differ for the same file.
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/image/raw-file-estimate-size \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"megapixels":24,"bit_depth":14}'const res = await fetch("https://api.kit.forhosting.com/image/raw-file-estimate-size", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"megapixels": 24,
"bit_depth": 14
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/raw-file-estimate-size",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"megapixels": 24,
"bit_depth": 14
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/raw-file-estimate-size", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"megapixels":24,"bit_depth":14}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"megapixels":24,"bit_depth":14}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/raw-file-estimate-size", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"megapixels": 24,
"bit_depth": 14
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "image.raw_file_estimate_size",
"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.
Limits
max_mb | 15 |
max_megapixels | 12 |
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. |