Muscles generate force to resist gravitational and inertial forces and/or to undertake work, e.g. on the centre of mass. A trade-off in muscle architecture exists in muscles that do both; the fibres should be as short as possible to minimise activation cost but long enough to maintain an appropriate shortening velocity. Energetic cost is also influenced by tendon compliance which modulates the timecourse of muscle mechanical work. Here we use a Hill-type muscle model of the human medial gastrocnemius to determine the muscle fascicle length and Achilles tendon compliance that maximise efficiency during the stance phase of walking (1.2m/s) and running (3.2 and 3.9 m/s). A broad range of muscle fascicle lengths (ranging from 45 to 70 mm) and tendon stiffness values (150-500 N/mm) can achieve close to optimal efficiency at each speed of locomotion; however, efficient walking requires shorter muscle fascicles and a more compliant tendon than running. The values that maximise efficiency are within the range measured in normal populations. A non-linear toe-region region of the tendon force-length properties may further influence the optimal values, requiring a stiffer tendon with slightly longer muscle fascicles; however, it does not alter the main results. We conclude that muscle fibre length and tendon compliance combinations may be tuned to maximise efficiency under a given gait condition. Efficiency is maximised when the required volume of muscle is minimised, which may also help reduce limb inertia and basal metabolic costs.