{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"audio-file-size"},"result":{"entity_type":"calculator","id":"audio-file-size","calculator_id":"audio-file-size","canonical_url":"https://tttkmbb.com/developer/audio-file-size","name":"Audio File Size Calculator","title":"Audio File Size Calculator – Bytes and MB from Duration, Sample Rate, Bit Depth, Channels or Bitrate","category":"developer","category_name":"Developer & IT","tool_name":"calculate_audio_file_size","featured_mcp_tool":false,"description":"Computes the size of an audio recording from its duration and either the PCM parameters (sample rate × bit depth × channels, as in WAV/AIFF/CD audio) or a constant compressed bitrate (MP3, AAC, Opus), in bytes, MB and MiB, plus the minutes that fit in one gigabyte.","use_when":"You are planning storage or bandwidth for recordings, podcasts or music libraries, or want to compare uncompressed and compressed formats for a given length.","do_not_use_when":"The file uses variable bitrate with an unknown average, or you need video sizes (use video-file-size); container headers and metadata (a few kB) are ignored.","inputs":[{"name":"duration_seconds","label":"Duration","type":"number","unit":"s","required":true,"max":10000000,"exclusive_min":0,"description":"Length of the audio in seconds (3 minutes = 180).","example":180},{"name":"format","label":"Format","type":"enum","required":false,"default":"pcm_uncompressed","values":[{"value":"pcm_uncompressed","label":"Uncompressed PCM (WAV, AIFF, CD)","aliases":["pcm","wav","aiff","lossless","uncompressed"]},{"value":"compressed_bitrate","label":"Constant bitrate (MP3, AAC, Opus, Ogg)","aliases":["mp3","aac","opus","ogg","bitrate","compressed"]}],"description":"Whether the size follows from PCM parameters or from a fixed bitrate.","example":"pcm_uncompressed"},{"name":"sample_rate_hz","label":"Sample rate","type":"number","unit":"Hz","required":false,"default":44100,"min":1000,"max":1000000,"description":"Samples per second per channel (44100 CD, 48000 video/broadcast, 96000 hi-res); PCM only.","example":44100},{"name":"bit_depth","label":"Bit depth","type":"integer","unit":"bits","required":false,"default":16,"min":1,"max":64,"description":"Bits per sample (16 CD, 24 studio, 32 float); PCM only.","example":16},{"name":"channels","label":"Channels","type":"integer","required":false,"default":2,"min":1,"max":64,"description":"1 mono, 2 stereo, 6 for 5.1 surround; PCM only.","example":2},{"name":"bitrate_kbps","label":"Bitrate","type":"number","unit":"kbit/s","required":false,"default":128,"max":100000,"exclusive_min":0,"description":"Constant bitrate in kilobits per second (10³ bit/s), e.g. 128 or 320 for MP3, 96 for Opus; compressed only.","example":128}],"outputs":[{"name":"bitrate_kbps","label":"Effective bitrate","type":"number","unit":"kbit/s","decimals":2,"description":"sample_rate × bit_depth × channels / 1000 for PCM, or the given bitrate."},{"name":"bytes_per_second","label":"Data rate","type":"number","unit":"bytes/s","decimals":0,"description":"bitrate / 8 in bytes per second."},{"name":"file_size_bytes","label":"File size","type":"number","unit":"bytes","decimals":0,"description":"bytes_per_second × duration_seconds (audio data only)."},{"name":"file_size_mb","label":"File size (MB)","type":"number","unit":"MB","decimals":3,"description":"Size in megabytes (10⁶ bytes)."},{"name":"file_size_mib","label":"File size (MiB)","type":"number","unit":"MiB","decimals":3,"description":"Size in mebibytes (2²⁰ bytes), as shown by most operating systems."},{"name":"minutes_per_gb","label":"Minutes per GB","type":"number","unit":"min","decimals":2,"description":"How many minutes of audio fit in 10⁹ bytes at this bitrate."},{"name":"hours_per_gb","label":"Hours per GB","type":"number","unit":"h","decimals":2,"description":"minutes_per_gb / 60."}],"input_schema":{"type":"object","properties":{"duration_seconds":{"description":"Length of the audio in seconds (3 minutes = 180). Unit: s.","type":"number","maximum":10000000,"exclusiveMinimum":0,"examples":[180],"x-unit":"s"},"format":{"description":"Whether the size follows from PCM parameters or from a fixed bitrate.","type":"string","enum":["pcm_uncompressed","compressed_bitrate"],"default":"pcm_uncompressed","examples":["pcm_uncompressed"]},"sample_rate_hz":{"description":"Samples per second per channel (44100 CD, 48000 video/broadcast, 96000 hi-res); PCM only. Unit: Hz.","type":"number","minimum":1000,"maximum":1000000,"default":44100,"examples":[44100],"x-unit":"Hz"},"bit_depth":{"description":"Bits per sample (16 CD, 24 studio, 32 float); PCM only. Unit: bits.","type":"integer","minimum":1,"maximum":64,"default":16,"examples":[16],"x-unit":"bits"},"channels":{"description":"1 mono, 2 stereo, 6 for 5.1 surround; PCM only.","type":"integer","minimum":1,"maximum":64,"default":2,"examples":[2]},"bitrate_kbps":{"description":"Constant bitrate in kilobits per second (10³ bit/s), e.g. 128 or 320 for MP3, 96 for Opus; compressed only. Unit: kbit/s.","type":"number","maximum":100000,"exclusiveMinimum":0,"default":128,"examples":[128],"x-unit":"kbit/s"}},"additionalProperties":false,"required":["duration_seconds"]},"output_schema":{"type":"object","properties":{"bitrate_kbps":{"description":"sample_rate × bit_depth × channels / 1000 for PCM, or the given bitrate. Unit: kbit/s.","type":"number","x-unit":"kbit/s"},"bytes_per_second":{"description":"bitrate / 8 in bytes per second. Unit: bytes/s.","type":"number","x-unit":"bytes/s"},"file_size_bytes":{"description":"bytes_per_second × duration_seconds (audio data only). Unit: bytes.","type":"number","x-unit":"bytes"},"file_size_mb":{"description":"Size in megabytes (10⁶ bytes). Unit: MB.","type":"number","x-unit":"MB"},"file_size_mib":{"description":"Size in mebibytes (2²⁰ bytes), as shown by most operating systems. Unit: MiB.","type":"number","x-unit":"MiB"},"minutes_per_gb":{"description":"How many minutes of audio fit in 10⁹ bytes at this bitrate. Unit: min.","type":"number","x-unit":"min"},"hours_per_gb":{"description":"minutes_per_gb / 60. Unit: h.","type":"number","x-unit":"h"}}},"formula":"PCM: bitrate_bps = sample_rate_hz × bit_depth × channels; compressed: bitrate_bps = bitrate_kbps × 1000; file_size_bytes = bitrate_bps / 8 × duration_seconds; minutes_per_gb = 10⁹ / (bitrate_bps / 8) / 60","method":"Sizes cover the audio stream only; WAV adds a 44-byte header, tagged MP3s a few kB of ID3 metadata. CD audio (44.1 kHz, 16-bit, stereo) is 1,411.2 kbit/s, i.e. about 10.1 MB per minute.","sources":[{"name":"Pulse-code modulation (Wikipedia)","url":"https://en.wikipedia.org/wiki/Pulse-code_modulation","type":"reference","retrieved_at":"2026-09-24"},{"name":"Audio bit depth (Wikipedia)","url":"https://en.wikipedia.org/wiki/Audio_bit_depth","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"3 minutes of CD-quality PCM","inputs":{"duration_seconds":180,"format":"pcm_uncompressed","sample_rate_hz":44100,"bit_depth":16,"channels":2},"expected":{"bitrate_kbps":1411.2,"bytes_per_second":176400,"file_size_bytes":31752000,"file_size_mb":31.752,"file_size_mib":30.281,"minutes_per_gb":94.48},"url":"https://tttkmbb.com/api/v1/calculate/audio-file-size?duration_seconds=180&format=pcm_uncompressed&sample_rate_hz=44100&bit_depth=16&channels=2"},{"name":"3 minutes of 128 kbit/s MP3","inputs":{"duration_seconds":180,"format":"compressed_bitrate","bitrate_kbps":128},"expected":{"bitrate_kbps":128,"file_size_bytes":2880000,"file_size_mb":2.88,"minutes_per_gb":1041.67},"url":"https://tttkmbb.com/api/v1/calculate/audio-file-size?duration_seconds=180&format=compressed_bitrate&bitrate_kbps=128"}],"faq":[{"q":"Is a kilobit 1000 or 1024 bits here?","a":"1000, as in the bitrate figures shown by encoders and players (128 kbit/s = 128,000 bit/s). MB is 10⁶ bytes and MiB 2²⁰ bytes; both are reported."},{"q":"How big is FLAC?","a":"FLAC is lossless but variable: typically 50–70 % of the PCM size for music. Compute the PCM size and multiply by the expected ratio."},{"q":"Why is my MP3 slightly larger than calculated?","a":"ID3 tags (often with embedded cover art of 20–500 kB) and frame headers are added to the audio stream; VBR files also deviate from the nominal bitrate."}],"tags":["audio file size","wav size calculator","mp3 size","bitrate to file size","pcm size","minutes per gb"],"related":[{"calculator_id":"video-file-size","reason":"The same calculation for video streams."},{"calculator_id":"download-time","reason":"Transfer time for the resulting size."},{"calculator_id":"data-storage","reason":"Convert MB, MiB, GB and other units."}],"links":{"html":"https://tttkmbb.com/developer/audio-file-size","markdown":"https://tttkmbb.com/developer/audio-file-size.md","json":"https://tttkmbb.com/developer/audio-file-size.json","api":"https://tttkmbb.com/api/v1/calculate/audio-file-size","schema":"https://tttkmbb.com/api/v1/calculators/audio-file-size","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:46:19Z","next_actions":[{"tool":"run_calculator","calculator_id":"audio-file-size","reason":"Run Audio File Size Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/developer/audio-file-size.md"}}