Electrical Energy Calculator
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open toolInteractive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.
Calculate buffer fill time, block rate, buffering latency and buffer memory from sampling rate and buffer length, or the largest buffer for a latency target.
Choose From buffer length or From latency target.
Enter the sampling rate per channel and its unit.
Enter the buffer length in samples per channel, or drag its slider, or enter the latency target.
Enter how many full buffers a sample waits through: 1 to capture then process, 2 for double buffering.
Enter channels and bytes per sample to see buffer memory.
Read latency, fill time, block rate and memory. Copy result copies labeled values; Reset restores the starting example.
Block processing collects N samples into a buffer before code runs on them. The first sample of a block has to wait for the whole buffer to fill, so one buffer adds N / f_s of delay, and the code is called f_s / N times per second.
Double buffering lets hardware fill one buffer while software processes the other. A sample then waits through about two buffer times before its result leaves the system, which is why audio interfaces quote latency as a multiple of the period size.
Shorter buffers lower latency but raise the callback rate and the overhead per sample, and every block must still be processed within one buffer time. Power-of-two lengths suit FFTs and some DMA engines but can land well under a latency target.
Limitations: the latency here counts whole buffers only. It omits ADC and DAC conversion delay, filter group delay, processing time, scheduling jitter and transport. Memory counts sample storage only, not descriptors or alignment padding. 24-bit samples stored in 32-bit containers take 4 bytes each.
Fill time: t_buf = N / f_s. N is samples per channel, f_s samples per second.
Block rate: r = f_s / N blocks per second.
Latency: L = B × N / f_s. B is the number of full buffers in the path.
Memory: M = B × N × C × s bytes. C channels, s bytes per sample.
Largest buffer: N = floor(L_max × f_s / B); power-of-two rounding uses the largest 2^k not above it.
48 kHz, 480 samples, 2 buffers, stereo 16-bit: 20 ms latency, 3840 bytes. Each buffer fills in 10 ms; 100 callbacks per second.
44.1 kHz, 1024 samples, 1 buffer: 23.21995465 ms. 1024 / 44100 s; 43.06640625 blocks per second.
44.1 kHz, 10 ms target, 2 buffers: 220 samples, 9.977324263 ms actual. floor(441 / 2) = 220.
48 kHz, 10 ms target, 1 buffer, power of two: 256 samples, 5.333333333 ms. 480 rounds down to 256; the margin is large.
1 kHz, 0.5 ms target: No buffer meets the target. Common mistake: one sample already takes 1 ms.
Available now
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open tool →Available now
Add up to 20 resistors in series using Ω, kΩ or MΩ for circuit analysis and electricity calculations, with a diagram and running total.
Open tool →Available now
Convert absolute temperatures between Celsius, Fahrenheit and kelvin.
Open tool →Nice audio board working as expected.
Given the fact that this was my first purchase and I made it thinking I was buying genuine Yihua products, this has been a setback. I received a lesser known OEM brand called MYTO and while both the products seem to be similar from appearance, my real contention is the quality and quantity of the brass wool. On top of that not informing the customer about the unavailability of the Yihua product and instead sending a product from a different brand is also antagonising. Henceforth, I might just have to think twice before ordering from ThinkRobotics.
TOF MINIF Range Sensor - UART TOF Time-of-Flight Laser Range Sensor
We are disappointed with our recent order experience. We clearly communicated our requirement for 433 MHz antennas on WhatsApp, but the issue remains unresolved. We have been following up for more than 10 days and are still waiting for a proper refund resolution.
As a regular B2B customer, we expected better support. This experience has affected our trust in ThinkRobotics, and we may have to consider other suppliers for future purchases. We request a fair and prompt refund.
Anodised Aluminium Cup Head Washers (Pack of 10)