In present-day land and marine controlled-source electromagnetic (CSEM) surveys, electromagnetic fields are commonly generated using wires that are hundreds of metres long. Nevertheless, simulations of CSEM data often approximate these sources as point dipoles. Although this is justified for sufficiently large source-receiver distances, many real surveys include frequencies and distances at which the dipole approximation is inaccurate. For 1D layered media, electromagnetic (EM) fields for point dipole sources can be computed using well-known quasi-analytical solutions and fields for sources of finite length can be synthesized by superposing point dipole fields. However, the calculation of numerous point dipole fields is computationally expensive, requiring a large number of numerical integral evaluations. We combine a more efficient representation of finite-length sources in terms of components related to the wire and its end points with very general expressions for EM fields in 1D layered media. We thus obtain a formulation that requires fewer numerical integrations than the superposition of dipole fields, permits source and receiver placement at any depth within the layer stack and can also easily be integrated into 3D modelling algorithms. Complex source geometries, such as wires bent due to surface obstructions, can be simulated by segmenting the wire and computing the responses for each segment separately. We first describe our finite-length wire expressions and then present 1D and 3D examples of EM fields due to finite-length sources for typical land and marine survey geometries and discuss differences to point dipole fields.