ForHosting KIT · Audio & Voice

Crossfade duration calculator

A crossfade shortens a two-clip sequence because both clips play at the same time during the transition.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This calculator takes the duration of the first clip, the duration of the second clip, and the intended crossfade length. It returns the finished combined duration plus the exact start and end of the overlap on the combined timeline. The result is useful when planning edits, checking delivery runtimes, positioning timeline markers, or generating deterministic timing data for an automated audio workflow.

Understand what a crossfade changes

Placing two clips end to end produces a sequence whose duration is simply the first duration plus the second. A crossfade changes that arithmetic because the end of clip A and the beginning of clip B occupy the same portion of the timeline. The shared portion must be counted once, not twice. This calculator subtracts the requested crossfade from the sum of both clip lengths to produce the combined duration. It assumes clip A begins at timeline position zero and clip B is shifted earlier until its opening section overlaps the closing section of clip A. Under that convention, the overlap ends exactly when clip A ends. A zero-second crossfade is valid and represents a direct cut: the overlap window has zero width, and the combined duration equals the two durations added together. All values are expressed in seconds, so decimal values can represent subsecond timing without requiring a separate frame-rate setting.

Read the overlap window correctly

The overlap window is reported on the resulting combined timeline, not as an offset within each source file. Its start is the duration of clip A minus the crossfade duration, and its end is the full duration of clip A. For example, if the first clip lasts twelve seconds and the crossfade lasts two seconds, the overlap begins at ten seconds and ends at twelve seconds. Clip B therefore begins at the reported overlap start, while the non-overlapping remainder of clip B continues after clip A has ended. These timestamps are convenient for editor markers, automation cues, and validation logs because they describe one shared timeline. The calculation does not inspect audio samples, choose a fade curve, or alter media. It handles timing only. Equal-power, linear, logarithmic, and custom gain curves can all use the same overlap window, so curve selection remains a separate mixing decision that does not change the duration result.

Validate an edit before rendering

A crossfade cannot be longer than either participating clip. Both clips must provide enough material to cover the entire overlap, so the calculator rejects a requested transition that exceeds the duration of clip A or clip B. It also rejects missing, nonnumeric, infinite, negative, or zero clip durations; the crossfade itself may be zero but cannot be negative. This validation is valuable in batch workflows where a bad timing instruction might otherwise reach a renderer and fail late after other work has completed. Use the returned combined duration to confirm a playlist, episode, or export target, and use the overlap boundaries to place transition events consistently. If you are chaining several clips, apply the calculation one junction at a time or subtract every valid crossfade once from the sum of all clip durations. Remember that this capability models two clips only and does not account for gaps, playback-rate changes, trims, or additional simultaneous layers.

Plan an audio edit

Calculate the final runtime and place precise markers before creating a crossfade in an editor.

Validate batch-render instructions

Reject impossible transition lengths before sending a job to an audio rendering pipeline.

Estimate playlist timing

Account for the time removed by an overlap when arranging two songs, segments, or ambience clips.

How is the combined duration calculated?

The calculator adds both clip durations and subtracts the crossfade duration once because the overlap is shared.

Where does the overlap start?

It starts at the first clip's duration minus the crossfade duration and ends when the first clip ends.

Can the crossfade duration be zero?

Yes. Zero represents a direct cut, produces a zero-width overlap window, and leaves the summed duration unchanged.

What happens if the crossfade is longer than a clip?

The request returns an invalid input error because each clip must be at least as long as the complete overlap.

What does the API request cost?

Each API request costs $0.002. The same deterministic calculation can also run in the browser.

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.

POSThttps://api.kit.forhosting.com/audio/crossfade-duration

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.

curl -X POST https://api.kit.forhosting.com/audio/crossfade-duration \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clip_a_duration":12.5,"clip_b_duration":8.25,"crossfade_duration":2.75}'
{
  "clip_a_duration": 12.5,
  "clip_b_duration": 8.25,
  "crossfade_duration": 2.75
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "audio.crossfade_duration",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb200
max_minutes180
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →